pub struct CommandString(_);
Available on crate feature
std
only.Expand description
Serializer for command string
Implementations
sourceimpl CommandString
impl CommandString
sourcepub fn try_from<S: Into<Cow<'static, str>>>(
s: S
) -> Result<CommandString, CommandStringError>
👎Deprecated since 0.29.0: Use TryFrom::try_from
or CommandString::try_from_static
pub fn try_from<S: Into<Cow<'static, str>>>(
s: S
) -> Result<CommandString, CommandStringError>
TryFrom::try_from
or CommandString::try_from_static
Convert from various string types into a CommandString.
Supported types are:
&'static str
String
Returns an error if and only if the string is larger than 12 characters in length.
sourcepub fn try_from_static(
s: &'static str
) -> Result<CommandString, CommandStringError>
pub fn try_from_static(
s: &'static str
) -> Result<CommandString, CommandStringError>
Convert &'static str
to CommandString
This is more efficient for string literals than non-static conversions because it avoids allocation.
Errors
Returns an error if and only if the string is larger than 12 characters in length.
Trait Implementations
sourceimpl AsRef<str> for CommandString
impl AsRef<str> for CommandString
sourceimpl Clone for CommandString
impl Clone for CommandString
sourcefn clone(&self) -> CommandString
fn clone(&self) -> CommandString
Returns a copy of the value. Read more
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for CommandString
impl Debug for CommandString
sourceimpl Decodable for CommandString
impl Decodable for CommandString
sourceimpl Display for CommandString
impl Display for CommandString
sourceimpl Encodable for CommandString
impl Encodable for CommandString
sourceimpl FromStr for CommandString
impl FromStr for CommandString
sourceimpl PartialEq<CommandString> for CommandString
impl PartialEq<CommandString> for CommandString
sourcefn eq(&self, other: &CommandString) -> bool
fn eq(&self, other: &CommandString) -> bool
sourceimpl<'a> TryFrom<&'a str> for CommandString
impl<'a> TryFrom<&'a str> for CommandString
sourceimpl TryFrom<String> for CommandString
impl TryFrom<String> for CommandString
impl Eq for CommandString
impl StructuralEq for CommandString
impl StructuralPartialEq for CommandString
Auto Trait Implementations
impl RefUnwindSafe for CommandString
impl Send for CommandString
impl Sync for CommandString
impl Unpin for CommandString
impl UnwindSafe for CommandString
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more