TString

Type Alias TString 

Source
pub type TString = Text<String>;
Available on crate feature alloc only.

Aliased Type§

pub struct TString { /* private fields */ }

Implementations§

Source§

impl TString

Source

pub const fn from_string1_unchecked(text: String1) -> Self

Source

pub fn into_string1(self) -> String1

Source

pub fn pop_char_or(&mut self) -> PopOr<'_, char>

Source

pub fn pop_grapheme_or(&mut self) -> PopOr<'_, Grapheme<'_>>

Source

pub fn leak<'a>(self) -> &'a TStr

Source

pub fn as_tstr(&self) -> &TStr

Source

pub fn as_mut_tstr(&mut self) -> &mut TStr

Methods from Deref<Target = TStr>§

Source

pub fn into_tstring(self: BoxedTStr) -> TString

Source

pub fn to_tstring(&self) -> TString

Source

pub fn graphemes1(&self) -> Iterator1<Peekable<Graphemes<'_>>>

Source

pub fn grapheme_indices1(&self) -> Iterator1<Peekable<GraphemeIndices<'_>>>

Source

pub fn as_str1(&self) -> &Str1

Source

pub fn as_mut_str1(&mut self) -> &mut Str1

Source

pub fn as_str(&self) -> &str

Source

pub fn as_mut_str(&mut self) -> &mut str

Source

pub fn pop_char_or(&mut self) -> PopOr<'_, char>

Source

pub fn pop_grapheme_or(&mut self) -> PopOr<'_, Grapheme<'_>>

Source

pub fn as_tstr(&self) -> &TStr

Source

pub fn as_mut_tstr(&mut self) -> &mut TStr

Trait Implementations§

Source§

impl AsMut<NonEmpty<str>> for TString

Source§

fn as_mut(&mut self) -> &mut Str1

Converts this type into a mutable reference of the (usually inferred) input type.
Source§

impl AsMut<Text<str>> for TString

Source§

fn as_mut(&mut self) -> &mut TStr

Converts this type into a mutable reference of the (usually inferred) input type.
Source§

impl AsRef<NonEmpty<str>> for TString

Source§

fn as_ref(&self) -> &Str1

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<Text<str>> for TString

Source§

fn as_ref(&self) -> &TStr

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl Borrow<Text<str>> for TString

Source§

fn borrow(&self) -> &TStr

Immutably borrows from an owned value. Read more
Source§

impl BorrowMut<Text<str>> for TString

Source§

fn borrow_mut(&mut self) -> &mut TStr

Mutably borrows from an owned value. Read more
Source§

impl Debug for TString

Source§

fn fmt(&self, formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Deref for TString

Source§

type Target = Text<str>

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl DerefMut for TString

Source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
Source§

impl Display for TString

Source§

fn fmt(&self, formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'a> From<&'a Text<str>> for TString

Source§

fn from(text: &'a TStr) -> Self

Converts to this type from the input type.
Source§

impl From<Box<Text<str>>> for TString

Source§

fn from(text: BoxedTStr) -> Self

Converts to this type from the input type.
Source§

impl<T> PartialEq<&T> for TString
where TString: PartialEq<T>, T: ?Sized,

Source§

fn eq(&self, other: &&T) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<Cow<'_, NonEmpty<str>>> for TString

Source§

fn eq(&self, other: &CowStr1<'_>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<Cow<'_, Text<str>>> for TString

Source§

fn eq(&self, other: &CowTStr<'_>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<Cow<'_, str>> for TString

Source§

fn eq(&self, other: &Cow<'_, str>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<NonEmpty<String>> for TString

Source§

fn eq(&self, other: &String1) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<NonEmpty<str>> for TString

Source§

fn eq(&self, other: &Str1) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<Text<str>> for TString

Source§

fn eq(&self, other: &TStr) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<str> for TString

Source§

fn eq(&self, other: &str) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<'a> TryFrom<&'a str> for TString

Source§

type Error = &'a str

The type returned in the event of a conversion error.
Source§

fn try_from(text: &'a str) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<NonEmpty<String>> for TString

Source§

type Error = NonEmpty<String>

The type returned in the event of a conversion error.
Source§

fn try_from(text: String1) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<String> for TString

Source§

type Error = String

The type returned in the event of a conversion error.
Source§

fn try_from(text: String) -> Result<Self, Self::Error>

Performs the conversion.