Struct ascii::AsciiString [−][src]
pub struct AsciiString { /* fields omitted */ }A growable string stored as an ASCII encoded buffer.
Methods
impl AsciiString[src]
impl AsciiStringpub fn new() -> Self[src]
pub fn new() -> SelfCreates a new, empty ASCII string buffer without allocating.
Examples
let mut s = AsciiString::new();
pub fn with_capacity(capacity: usize) -> Self[src]
pub fn with_capacity(capacity: usize) -> SelfCreates a new ASCII string buffer with the given capacity.
The string will be able to hold exactly capacity bytes without reallocating.
If capacity is 0, the ASCII string will not allocate.
Examples
let mut s = AsciiString::with_capacity(10);
pub unsafe fn from_raw_parts(
buf: *mut AsciiChar,
length: usize,
capacity: usize
) -> Self[src]
pub unsafe fn from_raw_parts(
buf: *mut AsciiChar,
length: usize,
capacity: usize
) -> SelfCreates a new AsciiString from a length, capacity and pointer.
Safety
This is highly unsafe, due to the number of invariants that aren't checked:
- The memory at
ptrneed to have been previously allocated by the same allocator this library uses. lengthneeds to be less than or equal tocapacity.capacityneeds to be the correct value.
Violating these may cause problems like corrupting the allocator's internal datastructures.
Examples
Basic usage:
use std::mem; unsafe { let s = AsciiString::from_ascii("hello").unwrap(); let ptr = s.as_ptr(); let len = s.len(); let capacity = s.capacity(); mem::forget(s); let s = AsciiString::from_raw_parts(ptr as *mut _, len, capacity); assert_eq!(AsciiString::from_ascii("hello").unwrap(), s); }
pub unsafe fn from_ascii_unchecked<B>(bytes: B) -> Self where
B: Into<Vec<u8>>, [src]
pub unsafe fn from_ascii_unchecked<B>(bytes: B) -> Self where
B: Into<Vec<u8>>, Converts a vector of bytes to an AsciiString without checking for non-ASCII characters.
Safety
This function is unsafe because it does not check that the bytes passed to it are valid
ASCII characters. If this constraint is violated, it may cause memory unsafety issues with
future of the AsciiString, as the rest of this library assumes that AsciiStrings are
ASCII encoded.
pub fn from_ascii<B>(bytes: B) -> Result<AsciiString, FromAsciiError<B>> where
B: Into<Vec<u8>> + AsRef<[u8]>, [src]
pub fn from_ascii<B>(bytes: B) -> Result<AsciiString, FromAsciiError<B>> where
B: Into<Vec<u8>> + AsRef<[u8]>, Converts anything that can represent a byte buffer into an AsciiString.
Failure
Returns the byte buffer if not all of the bytes are ASCII characters.
Examples
let foo = AsciiString::from_ascii("foo".to_string()).unwrap(); let err = AsciiString::from_ascii("Ŋ".to_string()).unwrap_err(); assert_eq!(foo.as_str(), "foo"); assert_eq!(err.into_source(), "Ŋ");
pub fn push_str(&mut self, string: &AsciiStr)[src]
pub fn push_str(&mut self, string: &AsciiStr)Pushes the given ASCII string onto this ASCII string buffer.
Examples
use std::str::FromStr; let mut s = AsciiString::from_str("foo").unwrap(); s.push_str("bar".as_ascii_str().unwrap()); assert_eq!(s, "foobar".as_ascii_str().unwrap());
pub fn capacity(&self) -> usize[src]
pub fn capacity(&self) -> usizeReturns the number of bytes that this ASCII string buffer can hold without reallocating.
Examples
let s = String::with_capacity(10); assert!(s.capacity() >= 10);
pub fn reserve(&mut self, additional: usize)[src]
pub fn reserve(&mut self, additional: usize)Reserves capacity for at least additional more bytes to be inserted in the given
AsciiString. The collection may reserve more space to avoid frequent reallocations.
Panics
Panics if the new capacity overflows usize.
Examples
let mut s = AsciiString::new(); s.reserve(10); assert!(s.capacity() >= 10);
pub fn reserve_exact(&mut self, additional: usize)[src]
pub fn reserve_exact(&mut self, additional: usize)Reserves the minimum capacity for exactly additional more bytes to be inserted in the
given AsciiString. Does nothing if the capacity is already sufficient.
Note that the allocator may give the collection more space than it requests. Therefore
capacity can not be relied upon to be precisely minimal. Prefer reserve if future
insertions are expected.
Panics
Panics if the new capacity overflows usize.
Examples
let mut s = AsciiString::new(); s.reserve_exact(10); assert!(s.capacity() >= 10);
pub fn shrink_to_fit(&mut self)[src]
pub fn shrink_to_fit(&mut self)Shrinks the capacity of this ASCII string buffer to match it's length.
Examples
use std::str::FromStr; let mut s = AsciiString::from_str("foo").unwrap(); s.reserve(100); assert!(s.capacity() >= 100); s.shrink_to_fit(); assert_eq!(s.capacity(), 3);
pub fn push(&mut self, ch: AsciiChar)[src]
pub fn push(&mut self, ch: AsciiChar)Adds the given ASCII character to the end of the ASCII string.
Examples
let mut s = AsciiString::from_ascii("abc").unwrap(); s.push(AsciiChar::from('1').unwrap()); s.push(AsciiChar::from('2').unwrap()); s.push(AsciiChar::from('3').unwrap()); assert_eq!(s, "abc123");
pub fn truncate(&mut self, new_len: usize)[src]
pub fn truncate(&mut self, new_len: usize)Shortens a ASCII string to the specified length.
Panics
Panics if new_len > current length.
Examples
let mut s = AsciiString::from_ascii("hello").unwrap(); s.truncate(2); assert_eq!(s, "he");
pub fn pop(&mut self) -> Option<AsciiChar>[src]
pub fn pop(&mut self) -> Option<AsciiChar>Removes the last character from the ASCII string buffer and returns it.
Returns None if this string buffer is empty.
Examples
let mut s = AsciiString::from_ascii("foo").unwrap(); assert_eq!(s.pop().map(|c| c.as_char()), Some('o')); assert_eq!(s.pop().map(|c| c.as_char()), Some('o')); assert_eq!(s.pop().map(|c| c.as_char()), Some('f')); assert_eq!(s.pop(), None);
pub fn remove(&mut self, idx: usize) -> AsciiChar[src]
pub fn remove(&mut self, idx: usize) -> AsciiCharRemoves the ASCII character at position idx from the buffer and returns it.
Warning
This is an O(n) operation as it requires copying every element in the buffer.
Panics
If idx is out of bounds this function will panic.
Examples
let mut s = AsciiString::from_ascii("foo").unwrap(); assert_eq!(s.remove(0).as_char(), 'f'); assert_eq!(s.remove(1).as_char(), 'o'); assert_eq!(s.remove(0).as_char(), 'o');
pub fn insert(&mut self, idx: usize, ch: AsciiChar)[src]
pub fn insert(&mut self, idx: usize, ch: AsciiChar)Inserts an ASCII character into the buffer at position idx.
Warning
This is an O(n) operation as it requires copying every element in the buffer.
Panics
If idx is out of bounds this function will panic.
Examples
let mut s = AsciiString::from_ascii("foo").unwrap(); s.insert(2, AsciiChar::b); assert_eq!(s, "fobo");
pub fn len(&self) -> usize[src]
pub fn len(&self) -> usizeReturns the number of bytes in this ASCII string.
Examples
let s = AsciiString::from_ascii("foo").unwrap(); assert_eq!(s.len(), 3);
pub fn is_empty(&self) -> bool[src]
pub fn is_empty(&self) -> boolReturns true if the ASCII string contains zero bytes.
Examples
let mut s = AsciiString::new(); assert!(s.is_empty()); s.push(AsciiChar::from('a').unwrap()); assert!(!s.is_empty());
pub fn clear(&mut self)[src]
pub fn clear(&mut self)Truncates the ASCII string, setting length (but not capacity) to zero.
Examples
let mut s = AsciiString::from_ascii("foo").unwrap(); s.clear(); assert!(s.is_empty());
Methods from Deref<Target = AsciiStr>
pub fn as_str(&self) -> &str[src]
pub fn as_str(&self) -> &strConverts &self to a &str slice.
pub fn as_bytes(&self) -> &[u8][src]
pub fn as_bytes(&self) -> &[u8]Converts &self into a byte slice.
pub fn as_slice(&self) -> &[AsciiChar][src]
pub fn as_slice(&self) -> &[AsciiChar]Returns the entire string as slice of AsciiChars.
pub fn as_mut_slice(&mut self) -> &mut [AsciiChar][src]
pub fn as_mut_slice(&mut self) -> &mut [AsciiChar]Returns the entire string as mutable slice of AsciiChars.
pub fn as_ptr(&self) -> *const AsciiChar[src]
pub fn as_ptr(&self) -> *const AsciiCharReturns a raw pointer to the AsciiStr's buffer.
The caller must ensure that the slice outlives the pointer this function returns, or else it
will end up pointing to garbage. Modifying the AsciiStr may cause it's buffer to be
reallocated, which would also make any pointers to it invalid.
pub fn as_mut_ptr(&mut self) -> *mut AsciiChar[src]
pub fn as_mut_ptr(&mut self) -> *mut AsciiCharReturns an unsafe mutable pointer to the AsciiStr's buffer.
The caller must ensure that the slice outlives the pointer this function returns, or else it
will end up pointing to garbage. Modifying the AsciiStr may cause it's buffer to be
reallocated, which would also make any pointers to it invalid.
pub fn to_ascii_string(&self) -> AsciiString[src]
pub fn to_ascii_string(&self) -> AsciiStringCopies the content of this AsciiStr into an owned AsciiString.
pub fn len(&self) -> usize[src]
pub fn len(&self) -> usizeReturns the number of characters / bytes in this ASCII sequence.
Examples
let s = AsciiStr::from_ascii("foo").unwrap(); assert_eq!(s.len(), 3);
pub fn is_empty(&self) -> bool[src]
pub fn is_empty(&self) -> boolReturns true if the ASCII slice contains zero bytes.
Examples
let mut empty = AsciiStr::from_ascii("").unwrap(); let mut full = AsciiStr::from_ascii("foo").unwrap(); assert!(empty.is_empty()); assert!(!full.is_empty());
pub fn chars(&self) -> Chars[src]
pub fn chars(&self) -> CharsReturns an iterator over the characters of the AsciiStr.
pub fn chars_mut(&mut self) -> CharsMut[src]
pub fn chars_mut(&mut self) -> CharsMutReturns an iterator over the characters of the AsciiStr which allows you to modify the
value of each AsciiChar.
ⓘImportant traits for Lines<'a>pub fn lines(&self) -> Lines[src]
pub fn lines(&self) -> LinesReturns an iterator over the lines of the AsciiStr, which are themselves AsciiStrs.
Lines are ended with either LineFeed (\n), or CarriageReturn then LineFeed (\r\n).
The final line ending is optional.
pub fn trim(&self) -> &Self[src]
pub fn trim(&self) -> &SelfReturns an ASCII string slice with leading and trailing whitespace removed.
Examples
let example = AsciiStr::from_ascii(" \twhite \tspace \t").unwrap(); assert_eq!("white \tspace", example.trim());
pub fn trim_left(&self) -> &Self[src]
pub fn trim_left(&self) -> &SelfReturns an ASCII string slice with leading whitespace removed.
Examples
let example = AsciiStr::from_ascii(" \twhite \tspace \t").unwrap(); assert_eq!("white \tspace \t", example.trim_left());
pub fn trim_right(&self) -> &Self[src]
pub fn trim_right(&self) -> &SelfReturns an ASCII string slice with trailing whitespace removed.
Examples
let example = AsciiStr::from_ascii(" \twhite \tspace \t").unwrap(); assert_eq!(" \twhite \tspace", example.trim_right());
pub fn eq_ignore_ascii_case(&self, other: &Self) -> bool[src]
pub fn eq_ignore_ascii_case(&self, other: &Self) -> boolCompares two strings case-insensitively.
pub fn make_ascii_uppercase(&mut self)[src]
pub fn make_ascii_uppercase(&mut self)Replaces lowercase letters with their uppercase equivalent.
pub fn make_ascii_lowercase(&mut self)[src]
pub fn make_ascii_lowercase(&mut self)Replaces uppercase letters with their lowercase equivalent.
pub fn to_ascii_uppercase(&self) -> AsciiString[src]
pub fn to_ascii_uppercase(&self) -> AsciiStringReturns a copy of this string where letters 'a' to 'z' are mapped to 'A' to 'Z'.
pub fn to_ascii_lowercase(&self) -> AsciiString[src]
pub fn to_ascii_lowercase(&self) -> AsciiStringReturns a copy of this string where letters 'A' to 'Z' are mapped to 'a' to 'z'.
Trait Implementations
impl Clone for AsciiString[src]
impl Clone for AsciiStringfn clone(&self) -> AsciiString[src]
fn clone(&self) -> AsciiStringReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl Default for AsciiString[src]
impl Default for AsciiStringfn default() -> AsciiString[src]
fn default() -> AsciiStringReturns the "default value" for a type. Read more
impl PartialEq for AsciiString[src]
impl PartialEq for AsciiStringfn eq(&self, other: &AsciiString) -> bool[src]
fn eq(&self, other: &AsciiString) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &AsciiString) -> bool[src]
fn ne(&self, other: &AsciiString) -> boolThis method tests for !=.
impl Eq for AsciiString[src]
impl Eq for AsciiStringimpl PartialOrd for AsciiString[src]
impl PartialOrd for AsciiStringfn partial_cmp(&self, other: &AsciiString) -> Option<Ordering>[src]
fn partial_cmp(&self, other: &AsciiString) -> Option<Ordering>This method returns an ordering between self and other values if one exists. Read more
fn lt(&self, other: &AsciiString) -> bool[src]
fn lt(&self, other: &AsciiString) -> boolThis method tests less than (for self and other) and is used by the < operator. Read more
fn le(&self, other: &AsciiString) -> bool[src]
fn le(&self, other: &AsciiString) -> boolThis method tests less than or equal to (for self and other) and is used by the <= operator. Read more
fn gt(&self, other: &AsciiString) -> bool[src]
fn gt(&self, other: &AsciiString) -> boolThis method tests greater than (for self and other) and is used by the > operator. Read more
fn ge(&self, other: &AsciiString) -> bool[src]
fn ge(&self, other: &AsciiString) -> boolThis method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
impl Ord for AsciiString[src]
impl Ord for AsciiStringfn cmp(&self, other: &AsciiString) -> Ordering[src]
fn cmp(&self, other: &AsciiString) -> OrderingThis method returns an Ordering between self and other. Read more
fn max(self, other: Self) -> Self1.21.0[src]
fn max(self, other: Self) -> SelfCompares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self1.21.0[src]
fn min(self, other: Self) -> SelfCompares and returns the minimum of two values. Read more
impl Hash for AsciiString[src]
impl Hash for AsciiStringfn hash<__H: Hasher>(&self, state: &mut __H)[src]
fn hash<__H: Hasher>(&self, state: &mut __H)Feeds this value into the given [Hasher]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, Feeds a slice of this type into the given [Hasher]. Read more
impl Deref for AsciiString[src]
impl Deref for AsciiStringtype Target = AsciiStr
The resulting type after dereferencing.
fn deref(&self) -> &AsciiStr[src]
fn deref(&self) -> &AsciiStrDereferences the value.
impl DerefMut for AsciiString[src]
impl DerefMut for AsciiStringimpl PartialEq<str> for AsciiString[src]
impl PartialEq<str> for AsciiStringfn eq(&self, other: &str) -> bool[src]
fn eq(&self, other: &str) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &Rhs) -> bool1.0.0[src]
fn ne(&self, other: &Rhs) -> boolThis method tests for !=.
impl PartialEq<AsciiString> for str[src]
impl PartialEq<AsciiString> for strfn eq(&self, other: &AsciiString) -> bool[src]
fn eq(&self, other: &AsciiString) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &Rhs) -> bool1.0.0[src]
fn ne(&self, other: &Rhs) -> boolThis method tests for !=.
impl<'a> PartialEq<String> for AsciiString[src]
impl<'a> PartialEq<String> for AsciiStringfn eq(&self, other: &String) -> bool[src]
fn eq(&self, other: &String) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &String) -> bool[src]
fn ne(&self, other: &String) -> boolThis method tests for !=.
impl<'a> PartialEq<AsciiString> for String[src]
impl<'a> PartialEq<AsciiString> for Stringfn eq(&self, other: &AsciiString) -> bool[src]
fn eq(&self, other: &AsciiString) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &AsciiString) -> bool[src]
fn ne(&self, other: &AsciiString) -> boolThis method tests for !=.
impl<'a> PartialEq<AsciiString> for &'a AsciiStr[src]
impl<'a> PartialEq<AsciiString> for &'a AsciiStrfn eq(&self, other: &AsciiString) -> bool[src]
fn eq(&self, other: &AsciiString) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &AsciiString) -> bool[src]
fn ne(&self, other: &AsciiString) -> boolThis method tests for !=.
impl<'a> PartialEq<&'a AsciiStr> for AsciiString[src]
impl<'a> PartialEq<&'a AsciiStr> for AsciiStringfn eq(&self, other: &&'a AsciiStr) -> bool[src]
fn eq(&self, other: &&'a AsciiStr) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &&'a AsciiStr) -> bool[src]
fn ne(&self, other: &&'a AsciiStr) -> boolThis method tests for !=.
impl<'a> PartialEq<AsciiString> for &'a str[src]
impl<'a> PartialEq<AsciiString> for &'a strfn eq(&self, other: &AsciiString) -> bool[src]
fn eq(&self, other: &AsciiString) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &AsciiString) -> bool[src]
fn ne(&self, other: &AsciiString) -> boolThis method tests for !=.
impl<'a> PartialEq<&'a str> for AsciiString[src]
impl<'a> PartialEq<&'a str> for AsciiStringfn eq(&self, other: &&'a str) -> bool[src]
fn eq(&self, other: &&'a str) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &&'a str) -> bool[src]
fn ne(&self, other: &&'a str) -> boolThis method tests for !=.
impl Borrow<AsciiStr> for AsciiString[src]
impl Borrow<AsciiStr> for AsciiStringimpl From<Vec<AsciiChar>> for AsciiString[src]
impl From<Vec<AsciiChar>> for AsciiStringimpl Into<Vec<u8>> for AsciiString[src]
impl Into<Vec<u8>> for AsciiStringimpl Into<String> for AsciiString[src]
impl Into<String> for AsciiStringimpl AsRef<AsciiStr> for AsciiString[src]
impl AsRef<AsciiStr> for AsciiStringimpl AsRef<[u8]> for AsciiString[src]
impl AsRef<[u8]> for AsciiStringimpl AsMut<AsciiStr> for AsciiString[src]
impl AsMut<AsciiStr> for AsciiStringimpl FromStr for AsciiString[src]
impl FromStr for AsciiStringtype Err = AsAsciiStrError
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<AsciiString, AsAsciiStrError>[src]
fn from_str(s: &str) -> Result<AsciiString, AsAsciiStrError>Parses a string s to return a value of this type. Read more
impl Display for AsciiString[src]
impl Display for AsciiStringfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Debug for AsciiString[src]
impl Debug for AsciiStringfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Write for AsciiString[src]
impl Write for AsciiStringPlease note that the std::fmt::Result returned by these methods does not support
transmission of an error other than that an error occurred.
fn write_str(&mut self, s: &str) -> Result[src]
fn write_str(&mut self, s: &str) -> ResultWrites a slice of bytes into this writer, returning whether the write succeeded. Read more
fn write_char(&mut self, c: char) -> Result[src]
fn write_char(&mut self, c: char) -> ResultWrites a [char] into this writer, returning whether the write succeeded. Read more
fn write_fmt(&mut self, args: Arguments) -> Result<(), Error>1.0.0[src]
fn write_fmt(&mut self, args: Arguments) -> Result<(), Error>Glue for usage of the [write!] macro with implementors of this trait. Read more
impl FromIterator<AsciiChar> for AsciiString[src]
impl FromIterator<AsciiChar> for AsciiStringfn from_iter<I: IntoIterator<Item = AsciiChar>>(iter: I) -> AsciiString[src]
fn from_iter<I: IntoIterator<Item = AsciiChar>>(iter: I) -> AsciiStringCreates a value from an iterator. Read more
impl<'a> FromIterator<&'a AsciiStr> for AsciiString[src]
impl<'a> FromIterator<&'a AsciiStr> for AsciiStringfn from_iter<I: IntoIterator<Item = &'a AsciiStr>>(iter: I) -> AsciiString[src]
fn from_iter<I: IntoIterator<Item = &'a AsciiStr>>(iter: I) -> AsciiStringCreates a value from an iterator. Read more
impl Extend<AsciiChar> for AsciiString[src]
impl Extend<AsciiChar> for AsciiStringfn extend<I: IntoIterator<Item = AsciiChar>>(&mut self, iterable: I)[src]
fn extend<I: IntoIterator<Item = AsciiChar>>(&mut self, iterable: I)Extends a collection with the contents of an iterator. Read more
impl<'a> Extend<&'a AsciiChar> for AsciiString[src]
impl<'a> Extend<&'a AsciiChar> for AsciiStringfn extend<I: IntoIterator<Item = &'a AsciiChar>>(&mut self, iter: I)[src]
fn extend<I: IntoIterator<Item = &'a AsciiChar>>(&mut self, iter: I)Extends a collection with the contents of an iterator. Read more
impl<'a> Extend<&'a AsciiStr> for AsciiString[src]
impl<'a> Extend<&'a AsciiStr> for AsciiStringfn extend<I: IntoIterator<Item = &'a AsciiStr>>(&mut self, iterable: I)[src]
fn extend<I: IntoIterator<Item = &'a AsciiStr>>(&mut self, iterable: I)Extends a collection with the contents of an iterator. Read more
impl<'a> Add<&'a AsciiStr> for AsciiString[src]
impl<'a> Add<&'a AsciiStr> for AsciiStringtype Output = AsciiString
The resulting type after applying the + operator.
fn add(self, other: &AsciiStr) -> AsciiString[src]
fn add(self, other: &AsciiStr) -> AsciiStringPerforms the + operation.
impl<T> Index<T> for AsciiString where
AsciiStr: Index<T>, [src]
impl<T> Index<T> for AsciiString where
AsciiStr: Index<T>, type Output = <AsciiStr as Index<T>>::Output
The returned type after indexing.
fn index(&self, index: T) -> &<AsciiStr as Index<T>>::Output[src]
fn index(&self, index: T) -> &<AsciiStr as Index<T>>::OutputPerforms the indexing (container[index]) operation.
impl<T> IndexMut<T> for AsciiString where
AsciiStr: IndexMut<T>, [src]
impl<T> IndexMut<T> for AsciiString where
AsciiStr: IndexMut<T>, fn index_mut(&mut self, index: T) -> &mut <AsciiStr as Index<T>>::Output[src]
fn index_mut(&mut self, index: T) -> &mut <AsciiStr as Index<T>>::OutputPerforms the mutable indexing (container[index]) operation.
impl IntoAsciiString for AsciiString[src]
impl IntoAsciiString for AsciiStringunsafe fn into_ascii_string_unchecked(self) -> AsciiString[src]
unsafe fn into_ascii_string_unchecked(self) -> AsciiStringConvert to AsciiString without checking for non-ASCII characters.
fn into_ascii_string(self) -> Result<Self, FromAsciiError<Self>>[src]
fn into_ascii_string(self) -> Result<Self, FromAsciiError<Self>>Convert to AsciiString.
Auto Trait Implementations
impl Send for AsciiString
impl Send for AsciiStringimpl Sync for AsciiString
impl Sync for AsciiString