pub struct CommandName(/* private fields */);Expand description
A control-word name as written in a declaration, stored without the
leading backslash — the spelling every signature and ParseCtx map is keyed
by.
Users write \bea, which in TOML wants a literal string ('\bea') to avoid
escaping. Both spellings are accepted and normalize to the same value: a
control word can never itself contain a backslash, so there is nothing to
disambiguate. Normalization lives in the type rather than at one call site so
every front end gets it.
Implementations§
Trait Implementations§
Source§impl Clone for CommandName
impl Clone for CommandName
Source§fn clone(&self) -> CommandName
fn clone(&self) -> CommandName
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CommandName
impl Debug for CommandName
Source§impl<'de> Deserialize<'de> for CommandName
impl<'de> Deserialize<'de> for CommandName
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
Source§impl Display for CommandName
impl Display for CommandName
impl Eq for CommandName
Source§impl From<&str> for CommandName
impl From<&str> for CommandName
Source§impl Hash for CommandName
impl Hash for CommandName
Source§impl Ord for CommandName
impl Ord for CommandName
Source§fn cmp(&self, other: &CommandName) -> Ordering
fn cmp(&self, other: &CommandName) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for CommandName
impl PartialEq for CommandName
Source§impl PartialOrd for CommandName
impl PartialOrd for CommandName
Source§impl Serialize for CommandName
impl Serialize for CommandName
impl StructuralPartialEq for CommandName
Auto Trait Implementations§
impl Freeze for CommandName
impl RefUnwindSafe for CommandName
impl Send for CommandName
impl Sync for CommandName
impl Unpin for CommandName
impl UnsafeUnpin for CommandName
impl UnwindSafe for CommandName
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