pub struct Text(pub String);Tuple Fields§
§0: StringImplementations§
Source§impl Text
impl Text
pub fn length(&self) -> usize
pub fn to_uppercase(&self) -> Text
pub fn to_lowercase(&self) -> Text
pub fn as_str(&self) -> &str
pub fn as_string(&self) -> String
pub fn char_at(&self, index: i64) -> Result<char, IndexOutOfBoundsError>
pub fn substring(&self, start: usize, end: usize) -> Option<Text>
pub fn contains(&self, substring: &str) -> bool
pub fn starts_with(&self, prefix: &str) -> bool
pub fn ends_with(&self, suffix: &str) -> bool
pub fn index_of(&self, substring: &str) -> Option<usize>
pub fn last_index_of(&self, substring: &str) -> Option<usize>
pub fn is_empty(&self) -> bool
pub fn trim(&self) -> Text
pub fn trim_start(&self) -> Text
pub fn split(&self, delimiter: &str) -> Vec<Text>
pub fn join(texts: &[Text], separator: &str) -> Text
pub fn repeat(&self, n: usize) -> Text
Source§impl Text
impl Text
pub fn clear(&mut self)
pub fn reverse(&mut self)
pub fn push_str(&mut self, s: &str)
pub fn push_char(&mut self, c: char)
pub fn pop_char(&mut self) -> Option<char>
pub fn insert(&mut self, index: usize, s: &str) -> Result<(), String>
pub fn remove(&mut self, index: usize) -> Result<char, String>
pub fn replace(&mut self, from: &str, to: &str)
pub fn replace_range( &mut self, range: Range<usize>, replace_with: &str, ) -> Result<(), String>
pub fn set_char_at( &mut self, index: i64, c: char, ) -> Result<(), IndexOutOfBoundsError>
Trait Implementations§
Source§impl AddAssign for Text
Allow TypedDatexValue += String and TypedDatexValue += &str
This can never panic since the Text::from from string will always succeed
impl AddAssign for Text
Allow TypedDatexValue
Source§fn add_assign(&mut self, rhs: Text)
fn add_assign(&mut self, rhs: Text)
Performs the
+= operation. Read moreSource§impl<'de> Deserialize<'de> for Text
impl<'de> Deserialize<'de> for Text
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<&str> for Text
The froms are used for this magic. This will automatically convert
the Rust types to Text when using the += operator.
impl From<&str> for Text
The froms are used for this magic. This will automatically convert the Rust types to Text when using the += operator.
Source§impl From<Text> for StructuralTypeDefinition
impl From<Text> for StructuralTypeDefinition
Source§impl StructuralEq for Text
impl StructuralEq for Text
Source§fn structural_eq(&self, other: &Self) -> bool
fn structural_eq(&self, other: &Self) -> bool
Check if two values are equal, ignoring the type.
impl Eq for Text
impl StructuralPartialEq for Text
Auto Trait Implementations§
impl Freeze for Text
impl RefUnwindSafe for Text
impl Send for Text
impl Sync for Text
impl Unpin for Text
impl UnwindSafe for Text
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> CustomError for T
impl<T> CustomError for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more