pub enum StreamMessage {
Mutter(String),
}
Expand description
A stream message for the Supermarket interface.
Variants§
Mutter(String)
Mutter something as you’re walking through the supermarket.
Since no-one will respond, this is a stream rather than a service.
Popular phrases include:
- Woah thats cheap!
- Everything used to be better in the good old days…
- Why did they move the toilet paper?
Implementations§
source§impl StreamMessage
impl StreamMessage
sourcepub fn is_mutter(&self) -> bool
pub fn is_mutter(&self) -> bool
Check if the message is a Self::Mutter
.
sourcepub fn as_mutter(&self) -> Option<&String>
pub fn as_mutter(&self) -> Option<&String>
Get the message as Self::Mutter
by reference.
sourcepub fn into_mutter(self) -> Result<String, Error>
pub fn into_mutter(self) -> Result<String, Error>
Get the message as Self::Mutter
by value.
Trait Implementations§
source§impl Debug for StreamMessage
impl Debug for StreamMessage
source§impl<F> FromMessage<F> for StreamMessage
impl<F> FromMessage<F> for StreamMessage
Auto Trait Implementations§
impl RefUnwindSafe for StreamMessage
impl Send for StreamMessage
impl Sync for StreamMessage
impl Unpin for StreamMessage
impl UnwindSafe for StreamMessage
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