Struct string32::String32 [−][src]
#[repr(transparent)]pub struct String32(_);
Expand description
A string that is indexed by u32
instead of usize
.
On 64-bit platforms, String32
only requires 16 bytes to store the pointer, length, and capacity. String
by comparison requires 24 bytes, plus padding.
Implementations
impl String32
[src]
impl String32
[src]#[must_use]pub fn with_capacity(cap: u32) -> Self
[src]
#[must_use]pub fn with_capacity(cap: u32) -> Self
[src]Create an empty String32
with enough capacity to hold cap
bytes.
Examples
let mut s = String32::with_capacity(1); let cap = s.capacity(); s.push('\n'); assert_eq!(cap, s.capacity());
#[must_use]pub fn capacity(&self) -> u32
[src]
#[must_use]pub fn capacity(&self) -> u32
[src]Return the capacity of this String32
in bytes.
Examples
let mut s = String32::new(); assert_eq!(0, s.capacity()); s.push('\n'); assert!(s.capacity() > 0);
pub fn pop(&mut self) -> Option<char>
[src]
pub fn pop(&mut self) -> Option<char>
[src]Pop a char
from the end of this String32
.
Examples
let mut s = String32::try_from("\n").unwrap(); assert_eq!(s.pop(), Some('\n')); assert_eq!(s.pop(), None);
pub fn insert_str<S>(&mut self, idx: u32, s: S) where
S: AsRef<str>,
[src]
pub fn insert_str<S>(&mut self, idx: u32, s: S) where
S: AsRef<str>,
[src]pub fn reserve(&mut self, additional: u32)
[src]
pub fn reserve(&mut self, additional: u32)
[src]Reserve space for additional bytes.
Examples
let mut s = String32::try_from("abc").unwrap(); s.reserve(10); println!("{}", s.capacity()); assert!(s.capacity() >= 13);
pub fn reserve_exact(&mut self, additional: u32)
[src]
pub fn reserve_exact(&mut self, additional: u32)
[src]Reserve space for an exact number of bytes.
Examples
let mut s = String32::with_capacity(5); s.reserve_exact(10); assert!(s.capacity() >= 10);
pub fn shrink_to_fit(&mut self)
[src]
pub fn shrink_to_fit(&mut self)
[src]Shrink the capacity of this String32
to match its length.
Examples
let mut s = String32::with_capacity(10); s.shrink_to_fit(); assert_eq!(0, s.capacity());
pub fn truncate(&mut self, new_len: u32)
[src]
pub fn truncate(&mut self, new_len: u32)
[src]Shortens this String32
to the specified length.
Examples
let mut s = String32::try_from("abcde").unwrap(); s.truncate(3); assert_eq!(s, "abc");
pub fn clear(&mut self)
[src]
pub fn clear(&mut self)
[src]Truncates the String32
into an empty string.
Examples
let mut s = String32::try_from("abc").unwrap(); s.clear(); assert!(s.is_empty());
#[must_use]pub fn into_bytes(self) -> Vec<u8>
[src]
#[must_use]pub fn into_bytes(self) -> Vec<u8>
[src]Converts a String32
into a vector of bytes.
Examples
let s = String32::try_from("123").unwrap(); let v = s.into_bytes(); assert_eq!(v, b"123");
#[must_use]pub fn into_boxed_str(self) -> Box<str>
[src]
#[must_use]pub fn into_boxed_str(self) -> Box<str>
[src]#[must_use = "if you plan to discard the second half, consider using `String32::truncate` instead"]pub fn split_off(&mut self, at: u32) -> Self
[src]
#[must_use = "if you plan to discard the second half, consider using `String32::truncate` instead"]pub fn split_off(&mut self, at: u32) -> Self
[src]pub unsafe fn from_raw_parts(buf: *mut u8, len: u32, cap: u32) -> Self
[src]
pub unsafe fn from_raw_parts(buf: *mut u8, len: u32, cap: u32) -> Self
[src]Create a new String32
from a raw pointer and corresponding length/capacity.
Safety
pub fn from_utf16(v: &[u16]) -> Result<Self, FromUtf16Error>
[src]
pub fn from_utf16(v: &[u16]) -> Result<Self, FromUtf16Error>
[src]Methods from Deref<Target = Str32>
#[must_use]pub fn as_mut_str(&mut self) -> &mut str
[src]
#[must_use]pub fn as_mut_str(&mut self) -> &mut str
[src]Convert a &mut Str32
to a &mut str
slice.
#[must_use]pub const fn as_bytes(&self) -> &[u8]
[src]
#[must_use]pub const fn as_bytes(&self) -> &[u8]
[src]Converts the Str32
to a byte slice.
Examples
let s: &Str32 = "123".try_into().unwrap(); assert_eq!(b"123", s.as_bytes());
#[must_use]pub unsafe fn as_bytes_mut(&mut self) -> &mut [u8]
[src]
#[must_use]pub unsafe fn as_bytes_mut(&mut self) -> &mut [u8]
[src]Converts the Str32
to a byte slice.
Examples
let mut s = String32::try_from("123").unwrap(); let bytes = unsafe { s.as_bytes_mut() }; assert_eq!(b"123", bytes);
Safety
See str::as_bytes_mut
.
#[must_use]pub fn bytes(&self) -> Bytes<'_>
[src]
#[must_use]pub fn bytes(&self) -> Bytes<'_>
[src]Returns an iterator over the bytes of the string slice.
#[must_use]pub fn as_mut_ptr(&mut self) -> *mut u8
[src]
#[must_use]pub fn as_mut_ptr(&mut self) -> *mut u8
[src]Converts the Str32
to a mutable raw pointer.
The caller must ensure that the string slice is only modified in a way that ensures it is always valid UTF-8.
#[must_use]pub fn len(&self) -> u32
[src]
#[must_use]pub fn len(&self) -> u32
[src]Returns the length of the Str32
in bytes.
Examples
let s: &Str32 = "test".try_into().unwrap(); assert_eq!(4, s.len());
#[must_use]pub fn is_empty(&self) -> bool
[src]
#[must_use]pub fn is_empty(&self) -> bool
[src]Returns whether the Str32
is empty.
Examples
let s: &Str32 = "".try_into().unwrap(); assert!(s.is_empty());
#[must_use]pub fn chars(&self) -> Chars<'_>
[src]
#[must_use]pub fn chars(&self) -> Chars<'_>
[src]Returns an iterator over the characters of the Str32
.
#[must_use]pub fn char_indices(&self) -> impl DoubleEndedIterator<Item = (u32, char)> + '_
[src]
#[must_use]pub fn char_indices(&self) -> impl DoubleEndedIterator<Item = (u32, char)> + '_
[src]Returns an iterator over the characters of the Str32
, and their byte indices.
#[must_use]pub fn lines(&self) -> impl DoubleEndedIterator<Item = &Self> + '_
[src]
#[must_use]pub fn lines(&self) -> impl DoubleEndedIterator<Item = &Self> + '_
[src]Returns an iterator over the lines of a &Str32
.
#[must_use]pub fn split_ascii_whitespace(
&self
) -> impl DoubleEndedIterator<Item = &Self> + '_
[src]
#[must_use]pub fn split_ascii_whitespace(
&self
) -> impl DoubleEndedIterator<Item = &Self> + '_
[src]Returns an iterator over the ASCII-whitespace-delimited words of a &Str32
.
#[must_use]pub fn split_at(&self, mid: u32) -> (&Self, &Self)
[src]
#[must_use]pub fn split_at(&self, mid: u32) -> (&Self, &Self)
[src]Splits a &Str32
in two at the given byte index.
Panics
Panics if mid
is not a UTF-8 code point boundary.
#[must_use]pub fn split_at_mut(&mut self, mid: u32) -> (&mut Self, &mut Self)
[src]
#[must_use]pub fn split_at_mut(&mut self, mid: u32) -> (&mut Self, &mut Self)
[src]Splits a &mut Str32
in two at the given byte index.
Panics
Panics if mid
is not a UTF-8 code point boundary.
#[must_use]pub fn split_whitespace(&self) -> impl DoubleEndedIterator<Item = &Self> + '_
[src]
#[must_use]pub fn split_whitespace(&self) -> impl DoubleEndedIterator<Item = &Self> + '_
[src]Returns an iterator over the whitespace-delimited words of a &Str32
.
#[must_use]pub fn eq_ignore_ascii_case(&self, other: &Self) -> bool
[src]
#[must_use]pub fn eq_ignore_ascii_case(&self, other: &Self) -> bool
[src]Checks if two string slices are equal, ignoring ASCII case mismatches.
#[must_use]pub fn escape_debug(&self) -> EscapeDebug<'_>
[src]
#[must_use]pub fn escape_debug(&self) -> EscapeDebug<'_>
[src]Return an iterator over the string slice’s chars, each escaped according to char::escape_debug
.
#[must_use]pub fn escape_default(&self) -> EscapeDefault<'_>
[src]
#[must_use]pub fn escape_default(&self) -> EscapeDefault<'_>
[src]Return an iterator over the string slice’s chars, each escaped according to char::escape_default
.
#[must_use]pub fn escape_unicode(&self) -> EscapeUnicode<'_>
[src]
#[must_use]pub fn escape_unicode(&self) -> EscapeUnicode<'_>
[src]Return an iterator over the string slice’s chars, each escaped according to char::escape_unicode
.
#[must_use]pub fn is_char_boundary(&self, index: u32) -> bool
[src]
#[must_use]pub fn is_char_boundary(&self, index: u32) -> bool
[src]Returns whether the given index corresponds to a char
boundary.
pub fn make_ascii_lowercase(&mut self)
[src]
pub fn make_ascii_lowercase(&mut self)
[src]Converts all uppercase ASCII characters to lowercase.
Examples
let mut s = String32::try_from("ABC").unwrap(); s.make_ascii_lowercase(); assert_eq!("abc", s);
pub fn make_ascii_uppercase(&mut self)
[src]
pub fn make_ascii_uppercase(&mut self)
[src]Converts all lowercase ASCII characters to uppercase.
Examples
let mut s = String32::try_from("abc").unwrap(); s.make_ascii_uppercase(); assert_eq!("ABC", s);
pub fn parse<F: FromStr>(&self) -> Result<F, F::Err>
[src]
pub fn parse<F: FromStr>(&self) -> Result<F, F::Err>
[src]Parses a &Str32
slice into another type.
Errors
Will return Err
if this &Str32
slice cannot be parsed into the desired type.
Err
: string32::TryFromStringError
#[must_use]pub fn to_lowercase(&self) -> String32
[src]
#[must_use]pub fn to_lowercase(&self) -> String32
[src]#[must_use]pub fn to_uppercase(&self) -> String32
[src]
#[must_use]pub fn to_uppercase(&self) -> String32
[src]#[must_use]pub fn to_ascii_lowercase(&self) -> String32
[src]
#[must_use]pub fn to_ascii_lowercase(&self) -> String32
[src]#[must_use]pub fn to_ascii_uppercase(&self) -> String32
[src]
#[must_use]pub fn to_ascii_uppercase(&self) -> String32
[src]#[must_use]pub fn trim(&self) -> &Self
[src]
#[must_use]pub fn trim(&self) -> &Self
[src]Returns a substring of this string with leading and trailing whitespace removed.
Examples
let s: &Str32 = " test\t\n ".try_into().unwrap(); assert_eq!("test", s.trim());
#[must_use]pub fn trim_start(&self) -> &Self
[src]
#[must_use]pub fn trim_start(&self) -> &Self
[src]Returns a substring of this string with leading whitespace removed.
Examples
let s: &Str32 = " test\t\n ".try_into().unwrap(); assert_eq!("test\t\n ", s.trim_start());
Trait Implementations
impl AddAssign<&'_ Str32> for String32
[src]
impl AddAssign<&'_ Str32> for String32
[src]fn add_assign(&mut self, rhs: &Str32)
[src]
fn add_assign(&mut self, rhs: &Str32)
[src]Performs the +=
operation. Read more
impl AddAssign<&'_ str> for String32
[src]
impl AddAssign<&'_ str> for String32
[src]fn add_assign(&mut self, rhs: &str)
[src]
fn add_assign(&mut self, rhs: &str)
[src]Performs the +=
operation. Read more
impl BorrowMut<Str32> for String32
[src]
impl BorrowMut<Str32> for String32
[src]fn borrow_mut(&mut self) -> &mut Str32
[src]
fn borrow_mut(&mut self) -> &mut Str32
[src]Mutably borrows from an owned value. Read more
impl<'a> FromIterator<&'a Str32> for String32
[src]
impl<'a> FromIterator<&'a Str32> for String32
[src]fn from_iter<I: IntoIterator<Item = &'a Str32>>(iter: I) -> Self
[src]
fn from_iter<I: IntoIterator<Item = &'a Str32>>(iter: I) -> Self
[src]Creates a value from an iterator. Read more
impl<'a> FromIterator<&'a char> for String32
[src]
impl<'a> FromIterator<&'a char> for String32
[src]fn from_iter<I: IntoIterator<Item = &'a char>>(iter: I) -> Self
[src]
fn from_iter<I: IntoIterator<Item = &'a char>>(iter: I) -> Self
[src]Creates a value from an iterator. Read more
impl<'a> FromIterator<&'a str> for String32
[src]
impl<'a> FromIterator<&'a str> for String32
[src]fn from_iter<I: IntoIterator<Item = &'a str>>(iter: I) -> Self
[src]
fn from_iter<I: IntoIterator<Item = &'a str>>(iter: I) -> Self
[src]Creates a value from an iterator. Read more
impl FromIterator<String> for String32
[src]
impl FromIterator<String> for String32
[src]fn from_iter<I: IntoIterator<Item = String>>(iter: I) -> Self
[src]
fn from_iter<I: IntoIterator<Item = String>>(iter: I) -> Self
[src]Creates a value from an iterator. Read more
impl FromIterator<String32> for String32
[src]
impl FromIterator<String32> for String32
[src]fn from_iter<I: IntoIterator<Item = Self>>(iter: I) -> Self
[src]
fn from_iter<I: IntoIterator<Item = Self>>(iter: I) -> Self
[src]Creates a value from an iterator. Read more
impl FromIterator<char> for String32
[src]
impl FromIterator<char> for String32
[src]fn from_iter<I: IntoIterator<Item = char>>(iter: I) -> Self
[src]
fn from_iter<I: IntoIterator<Item = char>>(iter: I) -> Self
[src]Creates a value from an iterator. Read more
impl Ord for String32
[src]
impl Ord for String32
[src]impl<'a, 'b> PartialOrd<&'a Str32> for String32
[src]
impl<'a, 'b> PartialOrd<&'a Str32> for String32
[src]fn partial_cmp(&self, rhs: &&'a Str32) -> Option<Ordering>
[src]
fn partial_cmp(&self, rhs: &&'a Str32) -> Option<Ordering>
[src]This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl<'a, 'b> PartialOrd<&'a str> for String32
[src]
impl<'a, 'b> PartialOrd<&'a str> for String32
[src]fn partial_cmp(&self, rhs: &&'a str) -> Option<Ordering>
[src]
fn partial_cmp(&self, rhs: &&'a str) -> Option<Ordering>
[src]This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl<'a, 'b> PartialOrd<Box<Str32, Global>> for String32
[src]
impl<'a, 'b> PartialOrd<Box<Str32, Global>> for String32
[src]fn partial_cmp(&self, rhs: &Box<Str32>) -> Option<Ordering>
[src]
fn partial_cmp(&self, rhs: &Box<Str32>) -> Option<Ordering>
[src]This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl<'a, 'b> PartialOrd<Box<str, Global>> for String32
[src]
impl<'a, 'b> PartialOrd<Box<str, Global>> for String32
[src]fn partial_cmp(&self, rhs: &Box<str>) -> Option<Ordering>
[src]
fn partial_cmp(&self, rhs: &Box<str>) -> Option<Ordering>
[src]This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl<'a, 'b> PartialOrd<Cow<'a, Str32>> for String32
[src]
impl<'a, 'b> PartialOrd<Cow<'a, Str32>> for String32
[src]fn partial_cmp(&self, rhs: &Cow<'a, Str32>) -> Option<Ordering>
[src]
fn partial_cmp(&self, rhs: &Cow<'a, Str32>) -> Option<Ordering>
[src]This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl<'a, 'b> PartialOrd<Cow<'a, str>> for String32
[src]
impl<'a, 'b> PartialOrd<Cow<'a, str>> for String32
[src]fn partial_cmp(&self, rhs: &Cow<'a, str>) -> Option<Ordering>
[src]
fn partial_cmp(&self, rhs: &Cow<'a, str>) -> Option<Ordering>
[src]This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl<'a, 'b> PartialOrd<Str32> for String32
[src]
impl<'a, 'b> PartialOrd<Str32> for String32
[src]fn partial_cmp(&self, rhs: &Str32) -> Option<Ordering>
[src]
fn partial_cmp(&self, rhs: &Str32) -> Option<Ordering>
[src]This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl<'a, 'b> PartialOrd<String> for String32
[src]
impl<'a, 'b> PartialOrd<String> for String32
[src]fn partial_cmp(&self, rhs: &String) -> Option<Ordering>
[src]
fn partial_cmp(&self, rhs: &String) -> Option<Ordering>
[src]This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl PartialOrd<String32> for String32
[src]
impl PartialOrd<String32> for String32
[src]fn partial_cmp(&self, rhs: &Self) -> Option<Ordering>
[src]
fn partial_cmp(&self, rhs: &Self) -> Option<Ordering>
[src]This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl<'a, 'b> PartialOrd<String32> for Str32
[src]
impl<'a, 'b> PartialOrd<String32> for Str32
[src]fn partial_cmp(&self, rhs: &String32) -> Option<Ordering>
[src]
fn partial_cmp(&self, rhs: &String32) -> Option<Ordering>
[src]This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl<'a, 'b> PartialOrd<String32> for &'a Str32
[src]
impl<'a, 'b> PartialOrd<String32> for &'a Str32
[src]fn partial_cmp(&self, rhs: &String32) -> Option<Ordering>
[src]
fn partial_cmp(&self, rhs: &String32) -> Option<Ordering>
[src]This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl<'a, 'b> PartialOrd<str> for String32
[src]
impl<'a, 'b> PartialOrd<str> for String32
[src]fn partial_cmp(&self, rhs: &str) -> Option<Ordering>
[src]
fn partial_cmp(&self, rhs: &str) -> Option<Ordering>
[src]This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Eq for String32
[src]
impl StructuralEq for String32
[src]
Auto Trait Implementations
impl RefUnwindSafe for String32
impl Send for String32
impl Sync for String32
impl Unpin for String32
impl UnwindSafe for String32
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more