pub trait ReadMessage {
// Required methods
fn pop_erased(&mut self) -> Option<Erased>;
fn try_pop<M: Debug + 'static>(&mut self) -> Option<M>;
fn try_peek<M: Debug + 'static>(&self) -> Option<&M>;
fn peek_debug(&self) -> Option<&dyn Debug>;
}Expand description
This trait allows peeking and popping messages from the stack
Required Methods§
Sourcefn pop_erased(&mut self) -> Option<Erased>
fn pop_erased(&mut self) -> Option<Erased>
Pop a type-erased message from the stack, if non-empty
Sourcefn try_pop<M: Debug + 'static>(&mut self) -> Option<M>
fn try_pop<M: Debug + 'static>(&mut self) -> Option<M>
Try popping the last message from the stack with the given type
Sourcefn try_peek<M: Debug + 'static>(&self) -> Option<&M>
fn try_peek<M: Debug + 'static>(&self) -> Option<&M>
Try observing the last message on the stack without popping
Sourcefn peek_debug(&self) -> Option<&dyn Debug>
fn peek_debug(&self) -> Option<&dyn Debug>
Debug the last message on the stack, if any
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.