pub trait SendErrorCallback<Message, Error>: ConditionalSend + 'static {
// Required method
fn on_send_error(
&mut self,
message: &Message,
error: Error<Error>,
) -> ErrorHandlingStrategy;
}Available on crate feature
pipe only.Expand description
Callback called when an error is encountered while trying to send a message through the transport.
NOTE: it also receives dnet_base::Error::Closed errors and they need to be handled properly (most likely by returning ErrorHandlingStrategy::Close).
Required Methods§
Sourcefn on_send_error(
&mut self,
message: &Message,
error: Error<Error>,
) -> ErrorHandlingStrategy
fn on_send_error( &mut self, message: &Message, error: Error<Error>, ) -> ErrorHandlingStrategy
Handle sending error.
NOTE: it also receives dnet_base::Error::Closed errors and they need to be handled properly (most likely by returning ErrorHandlingStrategy::Close).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".