[−][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.
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]
fn cmp(&self, other: &Text) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
1.21.0[src]
fn clamp(self, min: Self, max: Self) -> Self
[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]
Text: PartialEq<T>,
impl PartialOrd<Text> for Text
[src]
fn partial_cmp(&self, other: &Text) -> Option<Ordering>
[src]
#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl PartialOrd<str> for Text
[src]
fn partial_cmp(&self, other: &str) -> Option<Ordering>
[src]
#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl PartialOrd<String> for Text
[src]
fn partial_cmp(&self, other: &String) -> Option<Ordering>
[src]
#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl PartialOrd<Text> for str
[src]
fn partial_cmp(&self, other: &Text) -> Option<Ordering>
[src]
#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl PartialOrd<Text> for String
[src]
fn partial_cmp(&self, other: &Text) -> Option<Ordering>
[src]
#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl<'_, T: ?Sized> PartialOrd<&'_ T> for Text where
Text: PartialOrd<T>,
[src]
Text: PartialOrd<T>,
fn partial_cmp(&self, other: &&T) -> Option<Ordering>
[src]
#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl Display for Text
[src]
impl Debug for Text
[src]
impl Deref for Text
[src]
impl Hash for Text
[src]
fn hash<H: Hasher>(&self, state: &mut H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Borrow<str> for Text
[src]
impl Serialize for Text
[src]
impl<'de> Deserialize<'de> for Text
[src]
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
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]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
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.
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[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,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<T> Render for T where
T: Display,
T: Display,
fn render(self, document: Document) -> Document
fn into_fragment(self) -> Document
fn add<Right>(self, other: Right) -> Combine<Self, Right> where
Right: Render,
Right: Render,