pub struct Context<'a> {
pub mav: bool,
pub user: &'a dyn Any,
}
Expand description
Context in which to execute a message.
Useful when multiple sources can execute commands.
Fields§
§mav: bool
Does output buffer contain data?
user: &'a dyn Any
User context data.
Do not use this to pass application data! Use traits instead. It’s only intended to pass along data from whatever context is running a command.
For example: User authentication information if the call comes from an authenticated interface or port number if the call comes from a serial port.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Context<'a>
impl<'a> !RefUnwindSafe for Context<'a>
impl<'a> !Send for Context<'a>
impl<'a> !Sync for Context<'a>
impl<'a> Unpin for Context<'a>
impl<'a> !UnwindSafe for Context<'a>
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