pub struct Subscription<CID, SID, CM>{ /* private fields */ }Expand description
A subscription describe if a target should be forwarded an event and under which conditions.
The target is described by a SubId so it can be either a [Component] or a [Ship].
The event is forwarded only if
- the event matches the
EventClause - and the target current state matches the
SubClause.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<CID, SID, CM> Freeze for Subscription<CID, SID, CM>
impl<CID, SID, CM> RefUnwindSafe for Subscription<CID, SID, CM>where
SubId<CID, SID>: RefUnwindSafe,
EventClause<CID, CM>: RefUnwindSafe,
SubClause<CID, SID>: RefUnwindSafe,
impl<CID, SID, CM> Send for Subscription<CID, SID, CM>
impl<CID, SID, CM> Sync for Subscription<CID, SID, CM>
impl<CID, SID, CM> Unpin for Subscription<CID, SID, CM>
impl<CID, SID, CM> UnsafeUnpin for Subscription<CID, SID, CM>where
SubId<CID, SID>: UnsafeUnpin,
EventClause<CID, CM>: UnsafeUnpin,
SubClause<CID, SID>: UnsafeUnpin,
impl<CID, SID, CM> UnwindSafe for Subscription<CID, SID, CM>where
SubId<CID, SID>: UnwindSafe,
EventClause<CID, CM>: UnwindSafe,
SubClause<CID, SID>: UnwindSafe,
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more