pub struct FlumeInbox<T> { /* private fields */ }Expand description
A wrapper around a flume::Sender that acts as a PolyBox.
Implementations§
Trait Implementations§
Source§impl<T> Clone for FlumeInbox<T>
impl<T> Clone for FlumeInbox<T>
Source§impl<T: Interface> DynPolyBox for FlumeInbox<T>
impl<T: Interface> DynPolyBox for FlumeInbox<T>
Source§fn _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.
Source§fn _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.Source§impl<T: Interface> PolyBox for FlumeInbox<T>
impl<T: Interface> PolyBox for FlumeInbox<T>
Source§impl<T, R> Sends<T> for FlumeInbox<R>
impl<T, R> Sends<T> for FlumeInbox<R>
Source§async fn send(&self, msg: T) -> Result<Output<T>, SendError<T>>
async fn send(&self, msg: T) -> Result<Output<T>, SendError<T>>
Sends a message of type
T to the inbox.Source§fn send_blocking(
&self,
msg: T,
) -> Result<<<T as Message>::Kind as MessageSpecifier<T>>::Output, SendError<T>>
fn send_blocking( &self, msg: T, ) -> Result<<<T as Message>::Kind as MessageSpecifier<T>>::Output, SendError<T>>
Same as
Sends::send, but blocks the current thread until the message is sent.Auto Trait Implementations§
impl<T> Freeze for FlumeInbox<T>
impl<T> RefUnwindSafe for FlumeInbox<T>
impl<T> Send for FlumeInbox<T>where
T: Send,
impl<T> Sync for FlumeInbox<T>where
T: Send,
impl<T> Unpin for FlumeInbox<T>
impl<T> UnsafeUnpin for FlumeInbox<T>
impl<T> UnwindSafe for FlumeInbox<T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> PolyboxExt for Twhere
T: PolyBox,
impl<T> PolyboxExt for Twhere
T: PolyBox,
Source§fn into_dyn_subset<T>(self) -> DynInbox<T>
fn into_dyn_subset<T>(self) -> DynInbox<T>
Converts into a dynamic inbox with a subset of the original types. Read more
Source§fn into_dyn(self) -> DynInbox<Self::Set>
fn into_dyn(self) -> DynInbox<Self::Set>
Converts into a dynamic inbox with the full set of original types.
Source§fn into_dyn_checked<T>(self) -> Result<DynInbox<T>, Self>where
T: Members,
fn into_dyn_checked<T>(self) -> Result<DynInbox<T>, Self>where
T: Members,
Converts into a dynamic inbox, checking at runtime if the types are compatible.
Source§fn accepts_msg(&self, id: TypeId) -> bool
fn accepts_msg(&self, id: TypeId) -> bool
Checks if the inbox accepts a message of the given type.
Source§fn accepts_msgs(&self, ids: &[TypeId]) -> bool
fn accepts_msgs(&self, ids: &[TypeId]) -> bool
Checks if the inbox accepts messages of the given types.
Source§fn send_checked<T>(
&self,
msg: T,
) -> impl Future<Output = Result<<<T as Message>::Kind as MessageSpecifier<T>>::Output, SendCheckedError<T>>> + Sendwhere
T: Message,
fn send_checked<T>(
&self,
msg: T,
) -> impl Future<Output = Result<<<T as Message>::Kind as MessageSpecifier<T>>::Output, SendCheckedError<T>>> + Sendwhere
T: Message,
Send any message, checking at runtime if the message is accepted or not.
Source§fn send_checked_blocking<T>(
&self,
msg: T,
) -> Result<<<T as Message>::Kind as MessageSpecifier<T>>::Output, SendCheckedError<T>>where
T: Message,
fn send_checked_blocking<T>(
&self,
msg: T,
) -> Result<<<T as Message>::Kind as MessageSpecifier<T>>::Output, SendCheckedError<T>>where
T: Message,
Same as
Self::send_checked, but blocks the current thread until the message is sent.Source§impl<T, S> SendsExt<T> for S
impl<T, S> SendsExt<T> for S
Source§fn request(
&self,
msg: T,
) -> impl Future<Output = Result<<<<T as Message>::Kind as MessageSpecifier<T>>::Output as MessageReply>::Reply, RequestError<T>>> + Send
fn request( &self, msg: T, ) -> impl Future<Output = Result<<<<T as Message>::Kind as MessageSpecifier<T>>::Output as MessageReply>::Reply, RequestError<T>>> + Send
Sends a message of type
T to the inbox and waits for a reply, if the message type has a reply type. Read moreSource§fn request_blocking(
&self,
msg: T,
) -> Result<<<<T as Message>::Kind as MessageSpecifier<T>>::Output as MessageReply>::Reply, RequestError<T>>
fn request_blocking( &self, msg: T, ) -> Result<<<<T as Message>::Kind as MessageSpecifier<T>>::Output as MessageReply>::Reply, RequestError<T>>
Same as
SendsExt::request, but blocks the current thread until the reply is received.