pub struct Message<T, R> {
pub data: T,
pub responder: Option<R>,
}Fields§
§data: T§responder: Option<R>Implementations§
Source§impl<T, R> Message<T, R>
impl<T, R> Message<T, R>
Sourcepub const fn without_responder(data: T) -> Self
pub const fn without_responder(data: T) -> Self
Creates message without need for responding
pub const fn needs_response(&self) -> bool
Trait Implementations§
impl<T: Eq, R: Eq> Eq for Message<T, R>
Source§impl<T: PartialEq, R: PartialEq> PartialEq for Message<T, R>
impl<T: PartialEq, R: PartialEq> PartialEq for Message<T, R>
impl<T, R> StructuralPartialEq for Message<T, R>
Auto Trait Implementations§
impl<T, R> Freeze for Message<T, R>
impl<T, R> RefUnwindSafe for Message<T, R>where
T: RefUnwindSafe,
R: RefUnwindSafe,
impl<T, R> Send for Message<T, R>
impl<T, R> Sync for Message<T, R>
impl<T, R> Unpin for Message<T, R>
impl<T, R> UnsafeUnpin for Message<T, R>where
T: UnsafeUnpin,
R: UnsafeUnpin,
impl<T, R> UnwindSafe for Message<T, R>where
T: UnwindSafe,
R: 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
impl<T, U> Captures<U> for Twhere
U: ?Sized,
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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