#[non_exhaustive]pub enum Message<'a> {
Pattern(PatternMessage<'a>),
Select(SelectMessage<'a>),
}Expand description
A message: a single pattern, or a selection among variants.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Pattern(PatternMessage<'a>)
No selectors: one pattern.
Select(SelectMessage<'a>)
.match with selectors and variants.
Implementations§
Source§impl<'a> Message<'a>
impl<'a> Message<'a>
Sourcepub fn declarations(&self) -> &[Declaration<'a>]
pub fn declarations(&self) -> &[Declaration<'a>]
The declarations of either kind of message.
Sourcepub fn into_owned(self) -> Message<'static>
pub fn into_owned(self) -> Message<'static>
The same message with every string owned.
Trait Implementations§
Source§impl<'de: 'a, 'a> Deserialize<'de> for Message<'a>
Available on crate feature serde only.
impl<'de: 'a, 'a> Deserialize<'de> for Message<'a>
Available on crate feature
serde only.Source§fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl<'a> Eq for Message<'a>
impl<'a> StructuralPartialEq for Message<'a>
Auto Trait Implementations§
impl<'a> Freeze for Message<'a>
impl<'a> RefUnwindSafe for Message<'a>
impl<'a> Send for Message<'a>
impl<'a> Sync for Message<'a>
impl<'a> Unpin for Message<'a>
impl<'a> UnsafeUnpin for Message<'a>
impl<'a> UnwindSafe for Message<'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