pub struct StrMath<'a> { /* private fields */ }Expand description
The main type that implements mathematical operations for strings.
Implementations§
Methods from Deref<Target = Cow<'a, str>>§
1.0.0 · Sourcepub fn to_mut(&mut self) -> &mut <B as ToOwned>::Owned
pub fn to_mut(&mut self) -> &mut <B as ToOwned>::Owned
Acquires a mutable reference to the owned form of the data.
Clones the data if it is not already owned.
§Examples
use std::borrow::Cow;
let mut cow = Cow::Borrowed("foo");
cow.to_mut().make_ascii_uppercase();
assert_eq!(
cow,
Cow::Owned(String::from("FOO")) as Cow<'_, str>
);Trait Implementations§
Source§impl<'a, T: 'a + ToMathStr<'a>> AddAssign<T> for StrMath<'a>
impl<'a, T: 'a + ToMathStr<'a>> AddAssign<T> for StrMath<'a>
Source§fn add_assign(&mut self, rhs: T)
fn add_assign(&mut self, rhs: T)
Performs the
+= operation. Read moreSource§impl<'a> DivAssign<&'a [char]> for StrMath<'a>
impl<'a> DivAssign<&'a [char]> for StrMath<'a>
Source§fn div_assign(&mut self, rhs: &'a [char])
fn div_assign(&mut self, rhs: &'a [char])
Performs the
/= operation. Read moreSource§impl<'a> DivAssign<&'a str> for StrMath<'a>
impl<'a> DivAssign<&'a str> for StrMath<'a>
Source§fn div_assign(&mut self, rhs: &'a str)
fn div_assign(&mut self, rhs: &'a str)
Performs the
/= operation. Read moreSource§impl DivAssign<char> for StrMath<'_>
impl DivAssign<char> for StrMath<'_>
Source§fn div_assign(&mut self, rhs: char)
fn div_assign(&mut self, rhs: char)
Performs the
/= operation. Read moreSource§impl DivAssign for StrMath<'_>
impl DivAssign for StrMath<'_>
Source§fn div_assign(&mut self, rhs: Self)
fn div_assign(&mut self, rhs: Self)
Performs the
/= operation. Read moreSource§impl MulAssign<isize> for StrMath<'_>
impl MulAssign<isize> for StrMath<'_>
Source§fn mul_assign(&mut self, rhs: isize)
fn mul_assign(&mut self, rhs: isize)
Performs the
*= operation. Read moreSource§impl MulAssign<usize> for StrMath<'_>
impl MulAssign<usize> for StrMath<'_>
Source§fn mul_assign(&mut self, rhs: usize)
fn mul_assign(&mut self, rhs: usize)
Performs the
*= operation. Read moreSource§impl<'a> MulAssign for StrMath<'a>
impl<'a> MulAssign for StrMath<'a>
Source§fn mul_assign(&mut self, rhs: StrMath<'a>)
fn mul_assign(&mut self, rhs: StrMath<'a>)
Performs the
*= operation. Read moreSource§impl Ord for StrMath<'_>
impl Ord for StrMath<'_>
Source§impl PartialOrd for StrMath<'_>
impl PartialOrd for StrMath<'_>
Source§impl<'a> RemAssign<&'a [char]> for StrMath<'a>
impl<'a> RemAssign<&'a [char]> for StrMath<'a>
Source§fn rem_assign(&mut self, rhs: &'a [char])
fn rem_assign(&mut self, rhs: &'a [char])
Performs the
%= operation. Read moreSource§impl<'a> RemAssign<&'a str> for StrMath<'a>
impl<'a> RemAssign<&'a str> for StrMath<'a>
Source§fn rem_assign(&mut self, rhs: &'a str)
fn rem_assign(&mut self, rhs: &'a str)
Performs the
%= operation. Read moreSource§impl RemAssign<char> for StrMath<'_>
impl RemAssign<char> for StrMath<'_>
Source§fn rem_assign(&mut self, rhs: char)
fn rem_assign(&mut self, rhs: char)
Performs the
%= operation. Read moreSource§impl RemAssign for StrMath<'_>
impl RemAssign for StrMath<'_>
Source§fn rem_assign(&mut self, rhs: Self)
fn rem_assign(&mut self, rhs: Self)
Performs the
%= operation. Read moreSource§impl ShlAssign<&StrMath<'_>> for StrMath<'_>
impl ShlAssign<&StrMath<'_>> for StrMath<'_>
Source§fn shl_assign(&mut self, rhs: &StrMath<'_>)
fn shl_assign(&mut self, rhs: &StrMath<'_>)
Performs the
<<= operation. Read moreSource§impl ShlAssign<&String> for StrMath<'_>
impl ShlAssign<&String> for StrMath<'_>
Source§fn shl_assign(&mut self, rhs: &String)
fn shl_assign(&mut self, rhs: &String)
Performs the
<<= operation. Read moreSource§impl ShlAssign<&str> for StrMath<'_>
impl ShlAssign<&str> for StrMath<'_>
Source§fn shl_assign(&mut self, rhs: &str)
fn shl_assign(&mut self, rhs: &str)
Performs the
<<= operation. Read moreSource§impl ShlAssign<u128> for StrMath<'_>
impl ShlAssign<u128> for StrMath<'_>
Source§fn shl_assign(&mut self, rhs: u128)
fn shl_assign(&mut self, rhs: u128)
Performs the
<<= operation. Read moreSource§impl ShlAssign<u16> for StrMath<'_>
impl ShlAssign<u16> for StrMath<'_>
Source§fn shl_assign(&mut self, rhs: u16)
fn shl_assign(&mut self, rhs: u16)
Performs the
<<= operation. Read moreSource§impl ShlAssign<u32> for StrMath<'_>
impl ShlAssign<u32> for StrMath<'_>
Source§fn shl_assign(&mut self, rhs: u32)
fn shl_assign(&mut self, rhs: u32)
Performs the
<<= operation. Read moreSource§impl ShlAssign<u64> for StrMath<'_>
impl ShlAssign<u64> for StrMath<'_>
Source§fn shl_assign(&mut self, rhs: u64)
fn shl_assign(&mut self, rhs: u64)
Performs the
<<= operation. Read moreSource§impl ShlAssign<u8> for StrMath<'_>
impl ShlAssign<u8> for StrMath<'_>
Source§fn shl_assign(&mut self, rhs: u8)
fn shl_assign(&mut self, rhs: u8)
Performs the
<<= operation. Read moreSource§impl ShlAssign<usize> for StrMath<'_>
impl ShlAssign<usize> for StrMath<'_>
Source§fn shl_assign(&mut self, rhs: usize)
fn shl_assign(&mut self, rhs: usize)
Performs the
<<= operation. Read moreSource§impl ShrAssign<&StrMath<'_>> for StrMath<'_>
impl ShrAssign<&StrMath<'_>> for StrMath<'_>
Source§fn shr_assign(&mut self, rhs: &StrMath<'_>)
fn shr_assign(&mut self, rhs: &StrMath<'_>)
Performs the
>>= operation. Read moreSource§impl ShrAssign<&String> for StrMath<'_>
impl ShrAssign<&String> for StrMath<'_>
Source§fn shr_assign(&mut self, rhs: &String)
fn shr_assign(&mut self, rhs: &String)
Performs the
>>= operation. Read moreSource§impl ShrAssign<&str> for StrMath<'_>
impl ShrAssign<&str> for StrMath<'_>
Source§fn shr_assign(&mut self, rhs: &str)
fn shr_assign(&mut self, rhs: &str)
Performs the
>>= operation. Read moreSource§impl ShrAssign<u128> for StrMath<'_>
impl ShrAssign<u128> for StrMath<'_>
Source§fn shr_assign(&mut self, rhs: u128)
fn shr_assign(&mut self, rhs: u128)
Performs the
>>= operation. Read moreSource§impl ShrAssign<u16> for StrMath<'_>
impl ShrAssign<u16> for StrMath<'_>
Source§fn shr_assign(&mut self, rhs: u16)
fn shr_assign(&mut self, rhs: u16)
Performs the
>>= operation. Read moreSource§impl ShrAssign<u32> for StrMath<'_>
impl ShrAssign<u32> for StrMath<'_>
Source§fn shr_assign(&mut self, rhs: u32)
fn shr_assign(&mut self, rhs: u32)
Performs the
>>= operation. Read moreSource§impl ShrAssign<u64> for StrMath<'_>
impl ShrAssign<u64> for StrMath<'_>
Source§fn shr_assign(&mut self, rhs: u64)
fn shr_assign(&mut self, rhs: u64)
Performs the
>>= operation. Read moreSource§impl ShrAssign<u8> for StrMath<'_>
impl ShrAssign<u8> for StrMath<'_>
Source§fn shr_assign(&mut self, rhs: u8)
fn shr_assign(&mut self, rhs: u8)
Performs the
>>= operation. Read moreSource§impl ShrAssign<usize> for StrMath<'_>
impl ShrAssign<usize> for StrMath<'_>
Source§fn shr_assign(&mut self, rhs: usize)
fn shr_assign(&mut self, rhs: usize)
Performs the
>>= operation. Read moreSource§impl<'a, T: ToMathStr<'a>> SubAssign<T> for StrMath<'_>
impl<'a, T: ToMathStr<'a>> SubAssign<T> for StrMath<'_>
Source§fn sub_assign(&mut self, rhs: T)
fn sub_assign(&mut self, rhs: T)
Performs the
-= operation. Read moreSource§impl<'a> ToMathStr<'a> for StrMath<'a>
impl<'a> ToMathStr<'a> for StrMath<'a>
Source§fn to_math_str(self) -> StrMath<'a>
fn to_math_str(self) -> StrMath<'a>
Convert this data into
StrMath.Source§impl Write for StrMath<'_>
impl Write for StrMath<'_>
impl<'a> Eq for StrMath<'a>
impl<'a> StructuralPartialEq for StrMath<'a>
Auto Trait Implementations§
impl<'a> Freeze for StrMath<'a>
impl<'a> RefUnwindSafe for StrMath<'a>
impl<'a> Send for StrMath<'a>
impl<'a> Sync for StrMath<'a>
impl<'a> Unpin for StrMath<'a>
impl<'a> UnwindSafe for StrMath<'a>
Blanket Implementations§
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