[−][src]Struct skim::AnsiString
A String that contains ANSI state (e.g. colors)
It is internally represented as Vec<(attr, string)>
Implementations
impl<'a> AnsiString<'a>
[src]
pub fn new_empty() -> Self
[src]
pub fn new_str(stripped: &'a str, fragments: Vec<(Attr, (u32, u32))>) -> Self
[src]
assume the fragments are ordered by (start, end) while end is exclusive
pub fn new_string(stripped: String, fragments: Vec<(Attr, (u32, u32))>) -> Self
[src]
assume the fragments are ordered by (start, end) while end is exclusive
pub fn parse(raw: &'a str) -> AnsiString<'static>
[src]
pub fn is_empty(&self) -> bool
[src]
pub fn into_inner(self) -> Cow<'a, str>
[src]
pub fn iter(&'a self) -> Box<dyn Iterator<Item = (char, Attr)> + 'a>
[src]
pub fn has_attrs(&self) -> bool
[src]
pub fn stripped(&self) -> &str
[src]
pub fn override_attrs(&mut self, attrs: Vec<(Attr, (u32, u32))>)
[src]
Trait Implementations
impl<'a> Clone for AnsiString<'a>
[src]
fn clone(&self) -> AnsiString<'a>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'a> Debug for AnsiString<'a>
[src]
impl<'a> From<&'a str> for AnsiString<'a>
[src]
fn from(s: &'a str) -> AnsiString<'a>
[src]
impl<'a> From<(&'a str, &'a [usize], Attr)> for AnsiString<'a>
[src]
impl<'a> From<DisplayContext<'a>> for AnsiString<'a>
[src]
fn from(context: DisplayContext<'a>) -> Self
[src]
impl From<String> for AnsiString<'static>
[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for AnsiString<'a>
impl<'a> Send for AnsiString<'a>
impl<'a> Sync for AnsiString<'a>
impl<'a> Unpin for AnsiString<'a>
impl<'a> UnwindSafe for AnsiString<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> AsAny for T where
T: Any,
[src]
T: Any,
pub fn as_any(&Self) -> &(dyn Any + 'static)
[src]
pub fn as_any_mut(&mut Self) -> &mut (dyn Any + 'static)
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,