pub trait DiscardPolicy {
// Required method
fn on_discard(
&mut self,
target: Address,
data: &[u8],
reason: DiscardReason,
);
}Expand description
Callback invoked when a stored message is discarded.
The default SilentDiscard does nothing. Apps can
implement this to log, count, or persist discards.
Required Methods§
Sourcefn on_discard(&mut self, target: Address, data: &[u8], reason: DiscardReason)
fn on_discard(&mut self, target: Address, data: &[u8], reason: DiscardReason)
Called when a message is discarded.