pub struct Grammar(/* private fields */);Expand description
Format-local name of a dialect grammar, for example sch-sw-33103.
The namespace is the owning DialectMatch’s, so a grammar cannot name a
foreign format by construction. The name holds the character class a
DialectId admits after its separator, which excludes the separator
itself: a full id has no spelling as a grammar name.
Serializes and deserializes as the plain string. try_from is the mint, so
no read path reaches the field without the check. serde refuses
transparent beside try_from; a newtype struct writes its inner string
with no wrapper of its own, which is the same wire form.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Grammar
impl<'de> Deserialize<'de> for Grammar
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Grammar
impl StructuralPartialEq for Grammar
Auto Trait Implementations§
impl Freeze for Grammar
impl RefUnwindSafe for Grammar
impl Send for Grammar
impl Sync for Grammar
impl Unpin for Grammar
impl UnsafeUnpin for Grammar
impl UnwindSafe for Grammar
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