Struct ansi_term::ANSIGenericString [−][src]
pub struct ANSIGenericString<'a, S: 'a + ToOwned + ?Sized> where
<S as ToOwned>::Owned: Debug, { /* fields omitted */ }
Expand description
An ANSIGenericString
includes a generic string type and a Style
to
display that string. ANSIString
and ANSIByteString
are aliases for
this type on str
and [u8]
, respectively.
Implementations
Trait Implementations
Cloning an ANSIGenericString
will clone its underlying string.
Examples
use ansi_term::ANSIString;
let plain_string = ANSIString::from("a plain string");
let clone_string = plain_string.clone();
assert_eq!(clone_string, plain_string);
Performs the conversion.
impl<'a, S: PartialEq + 'a + ToOwned + ?Sized> PartialEq<ANSIGenericString<'a, S>> for ANSIGenericString<'a, S> where
<S as ToOwned>::Owned: Debug,
impl<'a, S: PartialEq + 'a + ToOwned + ?Sized> PartialEq<ANSIGenericString<'a, S>> for ANSIGenericString<'a, S> where
<S as ToOwned>::Owned: Debug,
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
impl<'a, S: 'a + ToOwned + ?Sized> StructuralPartialEq for ANSIGenericString<'a, S> where
<S as ToOwned>::Owned: Debug,
Auto Trait Implementations
impl<'a, S: ?Sized> RefUnwindSafe for ANSIGenericString<'a, S> where
S: RefUnwindSafe,
<S as ToOwned>::Owned: RefUnwindSafe,
impl<'a, S: ?Sized> UnwindSafe for ANSIGenericString<'a, S> where
S: RefUnwindSafe,
<S as ToOwned>::Owned: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more