[][src]Struct nu_source::Text

pub struct Text { /* fields omitted */ }

A "Text" is like a string except that it can be cheaply cloned. You can also "extract" subtexts quite cheaply. You can also deref an &Text into a &str for interoperability.

Used to represent the value of an input file.

Methods

impl Text[src]

pub fn select(&mut self, range: Range<usize>)[src]

Modifies this restrict to a subset of its current range.

pub fn slice(&self, range: Range<usize>) -> Self[src]

Extract a new Text that is a subset of an old Text -- text.extract(1..3) is similar to &foo[1..3] except that it gives back an owned value instead of a borrowed value.

Trait Implementations

impl AsRef<str> for Text[src]

impl From<Arc<String>> for Text[src]

impl From<String> for Text[src]

impl<'_> From<&'_ String> for Text[src]

impl<'_> From<&'_ str> for Text[src]

impl<'_> From<&'_ Text> for Text[src]

impl Clone for Text[src]

impl Eq for Text[src]

impl Ord for Text[src]

impl PartialEq<Text> for Text[src]

impl PartialEq<str> for Text[src]

impl PartialEq<String> for Text[src]

impl PartialEq<Text> for str[src]

impl PartialEq<Text> for String[src]

impl<'_, T: ?Sized> PartialEq<&'_ T> for Text where
    Text: PartialEq<T>, 
[src]

impl PartialOrd<Text> for Text[src]

impl PartialOrd<str> for Text[src]

impl PartialOrd<String> for Text[src]

impl PartialOrd<Text> for str[src]

impl PartialOrd<Text> for String[src]

impl<'_, T: ?Sized> PartialOrd<&'_ T> for Text where
    Text: PartialOrd<T>, 
[src]

impl Display for Text[src]

impl Debug for Text[src]

impl Deref for Text[src]

type Target = str

The resulting type after dereferencing.

impl Hash for Text[src]

impl Borrow<str> for Text[src]

impl Serialize for Text[src]

impl<'de> Deserialize<'de> for Text[src]

Auto Trait Implementations

impl Send for Text

impl Sync for Text

impl Unpin for Text

impl UnwindSafe for Text

impl RefUnwindSafe for Text

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> Render for T where
    T: Display