pub struct CommandName(/* private fields */);Expand description
Stable command name (for example: runtime.start).
Implementations§
Source§impl CommandName
impl CommandName
Sourcepub fn new(value: impl Into<String>) -> Result<CommandName, RuntimeError>
pub fn new(value: impl Into<String>) -> Result<CommandName, RuntimeError>
Creates and validates an identifier.
Sourcepub fn validate(&self) -> Result<(), RuntimeError>
pub fn validate(&self) -> Result<(), RuntimeError>
Revalidates an identifier received from a serialized boundary.
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<CommandName, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<CommandName, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for CommandName
Source§impl Hash for CommandName
impl Hash for CommandName
Source§impl PartialEq for CommandName
impl PartialEq for CommandName
Source§impl Serialize for CommandName
impl Serialize for CommandName
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for CommandName
Source§impl TryFrom<&str> for CommandName
impl TryFrom<&str> for CommandName
Source§type Error = RuntimeError
type Error = RuntimeError
The type returned in the event of a conversion error.
Source§fn try_from(
value: &str,
) -> Result<CommandName, <CommandName as TryFrom<&str>>::Error>
fn try_from( value: &str, ) -> Result<CommandName, <CommandName as TryFrom<&str>>::Error>
Performs the conversion.
Source§impl TryFrom<String> for CommandName
impl TryFrom<String> for CommandName
Source§type Error = RuntimeError
type Error = RuntimeError
The type returned in the event of a conversion error.
Source§fn try_from(
value: String,
) -> Result<CommandName, <CommandName as TryFrom<String>>::Error>
fn try_from( value: String, ) -> Result<CommandName, <CommandName as TryFrom<String>>::Error>
Performs the conversion.
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