pub trait DynPolyBox: Send + Sync {
// Required method
fn _send_boxed_payload_checked(
&self,
msg: BoxedPayload,
) -> BoxFuture<'_, Result<(), SendCheckedError<BoxedPayload>>>;
// Provided method
fn _send_boxed_payload_checked_blocking(
&self,
msg: BoxedPayload,
) -> Result<(), SendCheckedError<BoxedPayload>> { ... }
}Expand description
Object-safe sub-trait of PolyBox, allowing for dynamic dispatch.
Required Methods§
Sourcefn _send_boxed_payload_checked(
&self,
msg: BoxedPayload,
) -> BoxFuture<'_, Result<(), SendCheckedError<BoxedPayload>>>
fn _send_boxed_payload_checked( &self, msg: BoxedPayload, ) -> BoxFuture<'_, Result<(), SendCheckedError<BoxedPayload>>>
Send a boxed payload.
Provided Methods§
Sourcefn _send_boxed_payload_checked_blocking(
&self,
msg: BoxedPayload,
) -> Result<(), SendCheckedError<BoxedPayload>>
fn _send_boxed_payload_checked_blocking( &self, msg: BoxedPayload, ) -> Result<(), SendCheckedError<BoxedPayload>>
Same as Self::_send_boxed_payload_checked, but blocks the current thread until the message is sent.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".