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 Freeze for StreamMessage
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