Trait CmdString

Source
pub trait CmdString:
    'static
    + Debug
    + Clone
    + Default
    + Eq
    + Hash
    + Sealed
where Self: AsRef<Self::Str> + AsRef<OsStr> + Deref<Target = Self::Str> + Borrow<Self::Str>,
{ type Str: ?Sized + ToOwned<Owned = Self> + AsRef<OsStr> + AsRef<Self::Str> + Eq + Hash + ToStringLossy; // Required method fn from_str(string: &str) -> &Self::Str; }
Expand description

A string type that can be used to construct commands.

Required Associated Types§

Source

type Str: ?Sized + ToOwned<Owned = Self> + AsRef<OsStr> + AsRef<Self::Str> + Eq + Hash + ToStringLossy

Unsized equivalent for references.

Required Methods§

Source

fn from_str(string: &str) -> &Self::Str

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl CmdString for String

Source§

type Str = str

Source§

fn from_str(string: &str) -> &Self::Str

Source§

impl CmdString for OsString

Source§

type Str = OsStr

Source§

fn from_str(string: &str) -> &Self::Str

Implementors§