pub struct ANSIGenericString<'a, S: 'a + ToOwned + ?Sized>{ /* private fields */ }
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§
Source§impl<'a, S: 'a + ToOwned + ?Sized> ANSIGenericString<'a, S>
impl<'a, S: 'a + ToOwned + ?Sized> ANSIGenericString<'a, S>
Trait Implementations§
Source§impl<'a, S: 'a + ToOwned + ?Sized> Clone for ANSIGenericString<'a, S>
impl<'a, S: 'a + ToOwned + ?Sized> Clone for ANSIGenericString<'a, S>
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);
Source§fn clone(&self) -> ANSIGenericString<'a, S>
fn clone(&self) -> ANSIGenericString<'a, S>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'a, I, S: 'a + ToOwned + ?Sized> From<I> for ANSIGenericString<'a, S>
impl<'a, I, S: 'a + ToOwned + ?Sized> From<I> for ANSIGenericString<'a, S>
Source§fn from(input: I) -> ANSIGenericString<'a, S>
fn from(input: I) -> ANSIGenericString<'a, S>
Converts to this type from the input type.
impl<'a, S: 'a + ToOwned + ?Sized> StructuralPartialEq for ANSIGenericString<'a, S>
Auto Trait Implementations§
impl<'a, S> Freeze for ANSIGenericString<'a, S>
impl<'a, S> RefUnwindSafe for ANSIGenericString<'a, S>
impl<'a, S> Send for ANSIGenericString<'a, S>
impl<'a, S> Sync for ANSIGenericString<'a, S>
impl<'a, S> Unpin for ANSIGenericString<'a, S>
impl<'a, S> UnwindSafe for ANSIGenericString<'a, S>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)