MessageSetReceiver

Struct MessageSetReceiver 

Source
pub struct MessageSetReceiver<MS>
where MS: MessageSet,
{ pub receiver: UnboundedReceiver<(MessageSetItem<MS>, Sender<MessageSetReplayItem<MS>>)>, pub msg_queue: Vec<(MessageSetItem<MS>, Sender<MessageSetReplayItem<MS>>)>, pub concurrent_msg_buf: FuturesUnordered<Either<Ready<Result<(<<MS as MessageSet>::Handler as HandleSyncConcurrent<<MS as MessageVariantSet>::SyncConcurrentVariant>>::Replay, Sender<MessageSetReplayItem<MS>>), JoinError>>, JoinHandle<(<<MS as MessageSet>::Handler as HandleSyncConcurrent<<MS as MessageVariantSet>::SyncConcurrentVariant>>::Replay, Sender<MessageSetReplayItem<MS>>)>>>, }

Fields§

§receiver: UnboundedReceiver<(MessageSetItem<MS>, Sender<MessageSetReplayItem<MS>>)>§msg_queue: Vec<(MessageSetItem<MS>, Sender<MessageSetReplayItem<MS>>)>§concurrent_msg_buf: FuturesUnordered<Either<Ready<Result<(<<MS as MessageSet>::Handler as HandleSyncConcurrent<<MS as MessageVariantSet>::SyncConcurrentVariant>>::Replay, Sender<MessageSetReplayItem<MS>>), JoinError>>, JoinHandle<(<<MS as MessageSet>::Handler as HandleSyncConcurrent<<MS as MessageVariantSet>::SyncConcurrentVariant>>::Replay, Sender<MessageSetReplayItem<MS>>)>>>

Implementations§

Source§

impl<MS> MessageSetReceiver<MS>
where MS: MessageSet,

Source

pub async fn recv( &mut self, ) -> Option<(MessageSetItem<MS>, Sender<MessageSetReplayItem<MS>>)>

Source

pub async fn handle_next( &mut self, handler: &mut <MS as MessageSet>::Handler, ) -> Result<Option<()>, MsgSetRecvError>

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> HandleAsync<()> for T

Source§

type Replay = ()

Source§

async fn handle(&mut self, _: ()) -> <T as HandleAsync<()>>::Replay

Source§

impl<T> HandleAsyncConcurrent<()> for T

Source§

type Replay = ()

Source§

async fn handle(&self, _: ()) -> <T as HandleAsyncConcurrent<()>>::Replay

Source§

impl<T> HandleSync<()> for T
where T: Sync,

Source§

type Replay = ()

Source§

fn handle(&mut self, _: ()) -> <T as HandleSync<()>>::Replay

Source§

fn is_blocking(&self, _msg: &M) -> bool

Source§

impl<T> HandleSyncConcurrent<()> for T
where T: Sync,

Source§

type Replay = ()

Source§

fn handle(&self, _: ()) -> <T as HandleSyncConcurrent<()>>::Replay

Source§

fn is_blocking(&self, _msg: &M) -> bool

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.