Struct rant::RantString
source · [−]pub struct RantString { /* private fields */ }
Expand description
Represents Rant’s string
type.
Implementations
sourceimpl RantString
impl RantString
sourceimpl RantString
impl RantString
sourcepub fn reversed(&self) -> Self
pub fn reversed(&self) -> Self
Creates a copy of the string with the graphemes in reverse order.
sourcepub fn grapheme_at(&self, index: usize) -> Option<RantString>
pub fn grapheme_at(&self, index: usize) -> Option<RantString>
Gets the grapheme string at the specified index.
sourcepub fn to_rant_list(&self) -> RantList
pub fn to_rant_list(&self) -> RantList
Splits the string into individual graphemes and returns them as a Rant list.
sourcepub fn to_rant_tuple(&self) -> RantTuple
pub fn to_rant_tuple(&self) -> RantTuple
Splits the string into individual graphemes and returns them as a Rant tuple.
Trait Implementations
sourceimpl Add<RantString> for RantString
impl Add<RantString> for RantString
sourceimpl Clone for RantString
impl Clone for RantString
sourceimpl Debug for RantString
impl Debug for RantString
sourceimpl Default for RantString
impl Default for RantString
sourcefn default() -> RantString
fn default() -> RantString
Returns the “default value” for a type. Read more
sourceimpl Display for RantString
impl Display for RantString
sourceimpl From<&'_ String> for RantString
impl From<&'_ String> for RantString
sourceimpl From<&'_ str> for RantString
impl From<&'_ str> for RantString
sourceimpl From<SmartString<Compact>> for RantString
impl From<SmartString<Compact>> for RantString
sourcefn from(s: CompactString) -> Self
fn from(s: CompactString) -> Self
Converts to this type from the input type.
sourceimpl From<String> for RantString
impl From<String> for RantString
sourceimpl From<char> for RantString
impl From<char> for RantString
sourceimpl FromRant for RantString
impl FromRant for RantString
sourcefn from_rant(v: RantValue) -> RantString
fn from_rant(v: RantValue) -> RantString
Converts from a RantValue
.
sourcefn is_optional_param_type() -> bool
fn is_optional_param_type() -> bool
Returns true
if the type can be used to represent an optional Rant parameter in native functions; otherwise, false
.
sourceimpl PartialEq<RantString> for RantString
impl PartialEq<RantString> for RantString
sourceimpl PartialOrd<RantString> for RantString
impl PartialOrd<RantString> for RantString
sourcefn partial_cmp(&self, other: &Self) -> Option<Ordering>
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl TryFromRant for RantString
impl TryFromRant for RantString
sourcefn try_from_rant(val: RantValue) -> Result<RantString, ValueError>
fn try_from_rant(val: RantValue) -> Result<RantString, ValueError>
Convert from a RantValue
.
sourcefn is_optional_param_type() -> bool
fn is_optional_param_type() -> bool
Returns true
if the type can be used to represent an optional Rant parameter in native functions; otherwise, false
.
sourceimpl TryIntoRant for RantString
impl TryIntoRant for RantString
sourcefn try_into_rant(self) -> Result<RantValue, ValueError>
fn try_into_rant(self) -> Result<RantValue, ValueError>
Attempts to convert to a RantValue
.
Auto Trait Implementations
impl RefUnwindSafe for RantString
impl Send for RantString
impl Sync for RantString
impl Unpin for RantString
impl UnwindSafe for RantString
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more