[−][src]Struct nu_source::Text
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.
Implementations
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 Borrow<str> for Text[src]
impl Clone for Text[src]
impl Debug for Text[src]
impl Deref for Text[src]
impl<'de> Deserialize<'de> for Text[src]
pub fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>, [src]
D: Deserializer<'de>,
impl Display for Text[src]
impl Eq for Text[src]
impl<'_> From<&'_ Text> for Text[src]
impl<'_> From<&'_ str> for Text[src]
impl From<String> for Text[src]
impl Hash for Text[src]
pub fn hash<H: Hasher>(&self, state: &mut H)[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
H: Hasher,
impl Ord for Text[src]
pub fn cmp(&self, other: &Text) -> Ordering[src]
#[must_use]pub fn max(self, other: Self) -> Self1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self1.50.0[src]
impl<T: ?Sized, '_> PartialEq<&'_ T> for Text where
Text: PartialEq<T>, [src]
Text: PartialEq<T>,
impl PartialEq<String> for Text[src]
pub fn eq(&self, other: &String) -> bool[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool1.0.0[src]
impl PartialEq<Text> for Text[src]
pub fn eq(&self, other: &Text) -> bool[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool1.0.0[src]
impl PartialEq<Text> for str[src]
pub fn eq(&self, other: &Text) -> bool[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool1.0.0[src]
impl PartialEq<Text> for String[src]
pub fn eq(&self, other: &Text) -> bool[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool1.0.0[src]
impl PartialEq<str> for Text[src]
pub fn eq(&self, other: &str) -> bool[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool1.0.0[src]
impl<T: ?Sized, '_> PartialOrd<&'_ T> for Text where
Text: PartialOrd<T>, [src]
Text: PartialOrd<T>,
pub fn partial_cmp(&self, other: &&T) -> Option<Ordering>[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool1.0.0[src]
impl PartialOrd<String> for Text[src]
pub fn partial_cmp(&self, other: &String) -> Option<Ordering>[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool1.0.0[src]
impl PartialOrd<Text> for Text[src]
pub fn partial_cmp(&self, other: &Text) -> Option<Ordering>[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool1.0.0[src]
impl PartialOrd<Text> for str[src]
pub fn partial_cmp(&self, other: &Text) -> Option<Ordering>[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool1.0.0[src]
impl PartialOrd<Text> for String[src]
pub fn partial_cmp(&self, other: &Text) -> Option<Ordering>[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool1.0.0[src]
impl PartialOrd<str> for Text[src]
pub fn partial_cmp(&self, other: &str) -> Option<Ordering>[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool1.0.0[src]
impl Serialize for Text[src]
Auto Trait Implementations
impl RefUnwindSafe for Text[src]
impl Send for Text[src]
impl Sync for Text[src]
impl Unpin for Text[src]
impl UnwindSafe for Text[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
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> DeserializeOwned for T where
T: for<'de> Deserialize<'de>, [src]
T: for<'de> Deserialize<'de>,
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> ToString for T where
T: Display + ?Sized, [src]
T: Display + ?Sized,
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>,