pub struct BString { /* private fields */ }
Expand description
Implementations§
Source§impl BString
impl BString
Sourcepub fn with_capacity(n: usize) -> BString
pub fn with_capacity(n: usize) -> BString
Creates a new empty BString
with the given capacity.
Sourcepub fn concat<S: AsRef<bstr>>(strs: &[S]) -> BString
pub fn concat<S: AsRef<bstr>>(strs: &[S]) -> BString
Returns a concatenated BString
consisting of the given bstr
values.
§Examples
use bstring::BString;
assert_eq!(BString::concat(&["hello", "world"]), "helloworld");
Sourcepub fn join<Sep: AsRef<bstr>, S: AsRef<bstr>>(sep: Sep, strs: &[S]) -> BString
pub fn join<Sep: AsRef<bstr>, S: AsRef<bstr>>(sep: Sep, strs: &[S]) -> BString
Returns a BString
consisting of the given bstr
values,
joined together with the given separator.
§Examples
use bstring::BString;
assert_eq!(BString::join(" ", &["hello", "world"]), "hello world");
Sourcepub unsafe fn from_raw_parts(
ptr: *mut u8,
length: usize,
capacity: usize,
) -> BString
pub unsafe fn from_raw_parts( ptr: *mut u8, length: usize, capacity: usize, ) -> BString
Creates a new BString
from a pointer, length, and capacity.
§Safety
This is unsafe due to a number of invariants that are not checked:
- The memory at
ptr
needs to have been previously allocated by the same allocator the standard library uses. length
needs to be less than or equal tocapacity
.capacity
needs to be the correct value.
Sourcepub fn as_mut_bstr(&mut self) -> &mut bstr
pub fn as_mut_bstr(&mut self) -> &mut bstr
Returns a mutable &bstr
slice containing the entire string.
Sourcepub fn as_mut_vec(&mut self) -> &mut Vec<u8> ⓘ
pub fn as_mut_vec(&mut self) -> &mut Vec<u8> ⓘ
Returns a mutable reference to the internal Vec<u8>
.
This method is safe because BString
does not enforce any invariants
over the content of its buffer. Any otherwise safe modifications may
be made to the returned Vec
.
Sourcepub fn into_bytes(self) -> Vec<u8> ⓘ
pub fn into_bytes(self) -> Vec<u8> ⓘ
Consumes the BString
and returns the internal Vec<u8>
.
Sourcepub fn into_string(self) -> Result<String, FromUtf8Error>
pub fn into_string(self) -> Result<String, FromUtf8Error>
Attempts to the convert the BString
into a String
.
If the byte string does not contain valid UTF-8 data, an error is returned.
Sourcepub fn push_str<S: AsRef<bstr>>(&mut self, s: S)
pub fn push_str<S: AsRef<bstr>>(&mut self, s: S)
Appends bytes from a given byte string to this buffer.
§Examples
use bstring::BString;
let mut bs = BString::from("Rebecca");
bs.push_str(" Bunch");
assert_eq!(bs, "Rebecca Bunch");
Sourcepub fn reserve(&mut self, additional: usize)
pub fn reserve(&mut self, additional: usize)
Ensures that the BString
capacity is at least additional
bytes
greater than its current length.
§Panics
If the new capacity overflows usize
.
Sourcepub fn reserve_exact(&mut self, additional: usize)
pub fn reserve_exact(&mut self, additional: usize)
Ensures that the BString
capacity is exactly additional
bytes
greater than its length.
§Panics
If the new the capacity overflows usize
.
Sourcepub fn shrink_to_fit(&mut self)
pub fn shrink_to_fit(&mut self)
Shrinks the capacity of the BString
to match its length.
Sourcepub fn truncate(&mut self, new_len: usize)
pub fn truncate(&mut self, new_len: usize)
Shortens the BString
to the given length.
If new_len
is greater than its current length, this has no effect.
This method does not affect the allocated capacity.
§Examples
use bstring::BString;
let mut bs = BString::from("Josh Chan");
bs.truncate(4);
assert_eq!(bs, "Josh");
Sourcepub fn pop(&mut self) -> Option<u8>
pub fn pop(&mut self) -> Option<u8>
Removes and returns the last byte of the string.
Returns None
if the string is empty.
Sourcepub fn remove(&mut self, idx: usize) -> u8
pub fn remove(&mut self, idx: usize) -> u8
Removes and returns the byte at the position idx
.
§Panics
If idx
is greater than or equal to the current length.
Sourcepub fn retain<F: FnMut(&u8) -> bool>(&mut self, f: F)
pub fn retain<F: FnMut(&u8) -> bool>(&mut self, f: F)
Retains only the elements that satisfy the given predicate.
In other words, removes all elements for which f(&e)
return false
.
§Examples
use bstring::BString;
let mut bs = BString::from("pretzel");
bs.retain(|&b| b != b'e');
assert_eq!(bs, "prtzl");
Sourcepub fn insert_str<S: AsRef<bstr>>(&mut self, idx: usize, s: S)
pub fn insert_str<S: AsRef<bstr>>(&mut self, idx: usize, s: S)
Inserts a byte string at position idx
.
§Examples
use bstring::BString;
let mut bs = BString::from("Covina");
bs.insert_str(0, "West ");
assert_eq!(bs, "West Covina");
Sourcepub fn split_off(&mut self, at: usize) -> BString
pub fn split_off(&mut self, at: usize) -> BString
Splits the BString
into two at the given index.
Returns a newly allocated BString
. self
contains bytes [0, at)
and the returned BString
contains bytes [at, len)
.
The capacity of self
is not affected.
§Panics
If at
is greater than the current length.
Sourcepub fn clear(&mut self)
pub fn clear(&mut self)
Truncates this BString
, removing all contents.
The BString
will have a length of zero, but its capacity will be
unaffected.
Sourcepub fn into_boxed_bstr(self) -> Box<bstr>
pub fn into_boxed_bstr(self) -> Box<bstr>
Converts this BString
into a Box<bstr>
.
This will drop any excess capacity.
Methods from Deref<Target = bstr>§
Sourcepub fn as_mut_bytes(&mut self) -> &mut [u8] ⓘ
pub fn as_mut_bytes(&mut self) -> &mut [u8] ⓘ
Returns a mutable reference to the internal byte slice.
Sourcepub fn as_mut_ptr(&mut self) -> *mut u8
pub fn as_mut_ptr(&mut self) -> *mut u8
Returns a raw mutable pointer to the contained buffer.
Sourcepub fn to_bstring(&self) -> BString
pub fn to_bstring(&self) -> BString
Returns a newly allocated BString
buffer for the
Sourcepub fn to_str(&self) -> Result<&str, Utf8Error>
pub fn to_str(&self) -> Result<&str, Utf8Error>
Attempts to convert the byte string to a str
slice.
If the byte string does not contain valid UTF-8, an error is returned.
Sourcepub unsafe fn to_str_unchecked(&self) -> &str
pub unsafe fn to_str_unchecked(&self) -> &str
Sourcepub fn to_string_lossy(&self) -> Cow<'_, str>
pub fn to_string_lossy(&self) -> Cow<'_, str>
Converts the byte string a String
.
During this conversion, any invalid UTF-8 sequences will be replaced
with U+FFFD REPLACEMENT CHARACTER
, which looks like this �
Sourcepub fn display(&self) -> Display<'_>
pub fn display(&self) -> Display<'_>
Returns an object that implements Display
for safely printing
byte strings that may contain non-UTF-8 data.
Sourcepub fn get(&self, idx: usize) -> Option<&u8>
pub fn get(&self, idx: usize) -> Option<&u8>
Returns the byte at the given index.
Returns None
if idx
is greater than or equal to the string length.
Sourcepub unsafe fn get_unchecked(&self, idx: usize) -> &u8
pub unsafe fn get_unchecked(&self, idx: usize) -> &u8
Returns the byte at the given index, bypassing bounds-checking.
§Safety
The caller of this function must guarantee that idx
is less than
the byte string length.
Sourcepub unsafe fn slice_unchecked(&self, start: usize, end: usize) -> &bstr
pub unsafe fn slice_unchecked(&self, start: usize, end: usize) -> &bstr
Returns a subslice of this byte string, bypassing bounds-checking.
§Safety
The caller of this function must guarantee that:
start
is less than or equal toend
end
is less than or equal to the byte string length
Sourcepub unsafe fn slice_mut_unchecked(
&mut self,
start: usize,
end: usize,
) -> &mut bstr
pub unsafe fn slice_mut_unchecked( &mut self, start: usize, end: usize, ) -> &mut bstr
Returns a mutable subslice of this byte string, bypassing bounds-checking.
§Safety
The caller of this function must guarantee that:
start
is less than or equal toend
end
is less than or equal to the byte string length
Sourcepub fn first(&self) -> Option<&u8>
pub fn first(&self) -> Option<&u8>
Returns a borrowed reference to the first byte in the string.
Returns None
if the byte string is empty.
Sourcepub fn first_mut(&mut self) -> Option<&mut u8>
pub fn first_mut(&mut self) -> Option<&mut u8>
Returns a mutable reference to the first byte in the string.
Returns None
if the byte string is empty.
Sourcepub fn last(&self) -> Option<&u8>
pub fn last(&self) -> Option<&u8>
Returns a borrowed reference to the last byte in the string.
Returns None
if the byte string is empty.
Sourcepub fn last_mut(&mut self) -> Option<&mut u8>
pub fn last_mut(&mut self) -> Option<&mut u8>
Returns a mutable reference to the last byte in the string.
Returns None
if the byte string is empty.
Sourcepub fn iter(&self) -> Iter<'_> ⓘ
pub fn iter(&self) -> Iter<'_> ⓘ
Returns an iterator over the bytes of this string.
The element type of the returned iterator is &u8
.
Sourcepub fn iter_mut(&mut self) -> IterMut<'_> ⓘ
pub fn iter_mut(&mut self) -> IterMut<'_> ⓘ
Returns a mutable iterator over the bytes of this string.
The element type of the returned iterator is &mut u8
.
Sourcepub fn lines(&self) -> Lines<'_> ⓘ
pub fn lines(&self) -> Lines<'_> ⓘ
Returns an iterator over the lines of this byte string.
Lines may end with either a newline (\n
)
or a carriage return followed by a line feed (\r\n
).
Yielded subslices will not contain the line ending.
Sourcepub fn trim_right(&self) -> &bstr
pub fn trim_right(&self) -> &bstr
Returns a subslice with trailing whitespace removed.
Sourcepub fn trim_matches<'a, P: Pattern<'a>>(&'a self, pat: P) -> &bstrwhere
P::Searcher: DoubleEndedSearcher<'a>,
pub fn trim_matches<'a, P: Pattern<'a>>(&'a self, pat: P) -> &bstrwhere
P::Searcher: DoubleEndedSearcher<'a>,
Returns a subslice with all matching prefixes and suffixes removed.
Sourcepub fn trim_left_matches<'a, P: Pattern<'a>>(&'a self, pat: P) -> &bstr
pub fn trim_left_matches<'a, P: Pattern<'a>>(&'a self, pat: P) -> &bstr
Returns a subslice with all matching prefixes removed.
Sourcepub fn trim_right_matches<'a, P: Pattern<'a>>(&'a self, pat: P) -> &bstrwhere
P::Searcher: ReverseSearcher<'a>,
pub fn trim_right_matches<'a, P: Pattern<'a>>(&'a self, pat: P) -> &bstrwhere
P::Searcher: ReverseSearcher<'a>,
Returns a subslice with all matching suffixes removed.
Sourcepub fn partition<'a, P: Pattern<'a>>(
&'a self,
pat: P,
) -> Option<(&'a bstr, &'a bstr)>
pub fn partition<'a, P: Pattern<'a>>( &'a self, pat: P, ) -> Option<(&'a bstr, &'a bstr)>
Partitions the string using the given pattern.
The string is searched for the given pattern. If it is found, two subslices are returned: The portion of the string before the matching substring and the portion occurring after it.
§Examples
use bstring::bstr;
let bs = <&bstr>::from("foo=bar=baz");
let (a, b) = bs.partition(b'=').unwrap();
assert_eq!(a, "foo");
assert_eq!(b, "bar=baz");
Sourcepub fn rpartition<'a, P: Pattern<'a>>(
&'a self,
pat: P,
) -> Option<(&'a bstr, &'a bstr)>where
P::Searcher: ReverseSearcher<'a>,
pub fn rpartition<'a, P: Pattern<'a>>(
&'a self,
pat: P,
) -> Option<(&'a bstr, &'a bstr)>where
P::Searcher: ReverseSearcher<'a>,
Partitions the string using the given pattern, searching from the end.
The string is searched for the given pattern, starting from the end. If it is found, two subslices are returned: The portion of the string before the matching substring and the portion occurring after it.
§Examples
use bstring::bstr;
let bs = <&bstr>::from("foo=bar=baz");
let (a, b) = bs.rpartition(b'=').unwrap();
assert_eq!(a, "foo=bar");
assert_eq!(b, "baz");
Sourcepub fn split<'a, P: Pattern<'a>>(&'a self, pat: P) -> Split<'a, P> ⓘ
pub fn split<'a, P: Pattern<'a>>(&'a self, pat: P) -> Split<'a, P> ⓘ
Returns an iterator of subslices of this string, separated by a pattern.
Sourcepub fn rsplit<'a, P: Pattern<'a>>(&'a self, pat: P) -> RSplit<'a, P> ⓘ
pub fn rsplit<'a, P: Pattern<'a>>(&'a self, pat: P) -> RSplit<'a, P> ⓘ
Returns a reverse iterator of subslices of this string, separated by a pattern.
Sourcepub fn splitn<'a, P: Pattern<'a>>(
&'a self,
count: usize,
pat: P,
) -> SplitN<'a, P> ⓘ
pub fn splitn<'a, P: Pattern<'a>>( &'a self, count: usize, pat: P, ) -> SplitN<'a, P> ⓘ
Returns an iterator of subslices of this string, separated by a pattern,
limited to at most count
items.
If count
items are returned, the last item will contain the remainder
of the string.
Sourcepub fn rsplitn<'a, P: Pattern<'a>>(
&'a self,
count: usize,
pat: P,
) -> RSplitN<'a, P> ⓘwhere
P::Searcher: ReverseSearcher<'a>,
pub fn rsplitn<'a, P: Pattern<'a>>(
&'a self,
count: usize,
pat: P,
) -> RSplitN<'a, P> ⓘwhere
P::Searcher: ReverseSearcher<'a>,
Returns a reverse iterator of subslices of this string,
separated by a pattern, limited to at most count
items.
If count
items are returned, the last item will contain the remainder
of the string.
Sourcepub fn split_terminator<'a, P: Pattern<'a>>(
&'a self,
pat: P,
) -> SplitTerminator<'a, P> ⓘ
pub fn split_terminator<'a, P: Pattern<'a>>( &'a self, pat: P, ) -> SplitTerminator<'a, P> ⓘ
Returns an iterator of subslices of this string, separated by a pattern.
Equivalent to split
, except that the final subslice is skipped if
it is empty.
Sourcepub fn rsplit_terminator<'a, P: Pattern<'a>>(
&'a self,
pat: P,
) -> RSplitTerminator<'a, P> ⓘwhere
P::Searcher: ReverseSearcher<'a>,
pub fn rsplit_terminator<'a, P: Pattern<'a>>(
&'a self,
pat: P,
) -> RSplitTerminator<'a, P> ⓘwhere
P::Searcher: ReverseSearcher<'a>,
Returns a reverse iterator of subslices of this string, separated by a pattern.
Equivalent to rsplit
, except that the final subslice is skipped if
it is empty.
Sourcepub fn split_words<'a, P: Pattern<'a>>(&'a self, pat: P) -> SplitWords<'a, P> ⓘ
pub fn split_words<'a, P: Pattern<'a>>(&'a self, pat: P) -> SplitWords<'a, P> ⓘ
Returns an iterator of delimited words.
This differs from split
in that multiple occurances of a pattern
will be considered as one.
§Examples
use bstring::bstr;
let mut words = <&bstr>::from(" foo bar ").split_words(b' ');
assert_eq!(words.next().unwrap(), "foo");
assert_eq!(words.next().unwrap(), "bar");
assert_eq!(words.next(), None);
Sourcepub fn matches<'a, P: Pattern<'a>>(&'a self, pat: P) -> Matches<'a, P> ⓘ
pub fn matches<'a, P: Pattern<'a>>(&'a self, pat: P) -> Matches<'a, P> ⓘ
Returns an iterator over matches in the byte string.
Sourcepub fn rmatches<'a, P: Pattern<'a>>(&'a self, pat: P) -> RMatches<'a, P> ⓘ
pub fn rmatches<'a, P: Pattern<'a>>(&'a self, pat: P) -> RMatches<'a, P> ⓘ
Returns a reverse iterator over matches in the byte string.
Sourcepub fn match_indices<'a, P: Pattern<'a>>(
&'a self,
pat: P,
) -> MatchIndices<'a, P> ⓘ
pub fn match_indices<'a, P: Pattern<'a>>( &'a self, pat: P, ) -> MatchIndices<'a, P> ⓘ
Returns an iterator over matches in the byte string, including the index at which the match begins.
Sourcepub fn rmatch_indices<'a, P: Pattern<'a>>(
&'a self,
pat: P,
) -> RMatchIndices<'a, P> ⓘ
pub fn rmatch_indices<'a, P: Pattern<'a>>( &'a self, pat: P, ) -> RMatchIndices<'a, P> ⓘ
Returns a reverse iterator over matches in the byte string, including the index at which the match begins.
Sourcepub fn split_at(&self, mid: usize) -> (&bstr, &bstr)
pub fn split_at(&self, mid: usize) -> (&bstr, &bstr)
Returns the byte string divided into two at mid
.
§Panics
If mid
is beyond the end of the byte string.
Sourcepub fn split_at_mut(&mut self, mid: usize) -> (&mut bstr, &mut bstr)
pub fn split_at_mut(&mut self, mid: usize) -> (&mut bstr, &mut bstr)
Returns the byte string divided into two at mid
.
§Panics
If mid
is beyond the end of the byte string.
Sourcepub fn split_first(&self) -> Option<(&u8, &bstr)>
pub fn split_first(&self) -> Option<(&u8, &bstr)>
Returns the first byte and the rest,
or None
if the byte string is empty.
Sourcepub fn split_first_mut(&mut self) -> Option<(&mut u8, &mut bstr)>
pub fn split_first_mut(&mut self) -> Option<(&mut u8, &mut bstr)>
Returns the first byte and the rest,
or None
if the byte string is empty.
Sourcepub fn split_last(&self) -> Option<(&u8, &bstr)>
pub fn split_last(&self) -> Option<(&u8, &bstr)>
Returns the last byte and the rest,
or None
if the byte string is empty.
Sourcepub fn split_last_mut(&mut self) -> Option<(&mut u8, &mut bstr)>
pub fn split_last_mut(&mut self) -> Option<(&mut u8, &mut bstr)>
Returns the last byte and the rest,
or None
if the byte string is empty.
Sourcepub fn contains<'a, P: Pattern<'a>>(&'a self, pat: P) -> bool
pub fn contains<'a, P: Pattern<'a>>(&'a self, pat: P) -> bool
Returns whether the byte string contains the given pattern.
Sourcepub fn starts_with<'a, P: Pattern<'a>>(&'a self, pat: P) -> bool
pub fn starts_with<'a, P: Pattern<'a>>(&'a self, pat: P) -> bool
Returns whether the byte string starts with the given pattern.
Sourcepub fn ends_with<'a, P: Pattern<'a>>(&'a self, pat: P) -> boolwhere
P::Searcher: ReverseSearcher<'a>,
pub fn ends_with<'a, P: Pattern<'a>>(&'a self, pat: P) -> boolwhere
P::Searcher: ReverseSearcher<'a>,
Returns whether the byte string ends with the given pattern.
Sourcepub fn find<'a, P: Pattern<'a>>(&'a self, pat: P) -> Option<usize>
pub fn find<'a, P: Pattern<'a>>(&'a self, pat: P) -> Option<usize>
Returns the index of the first match of the given pattern.
Returns None
if there is no match.
Trait Implementations§
Source§impl<'a> AddAssign<&'a [u8]> for BString
impl<'a> AddAssign<&'a [u8]> for BString
Source§fn add_assign(&mut self, rhs: &[u8])
fn add_assign(&mut self, rhs: &[u8])
+=
operation. Read moreSource§impl<'a> AddAssign<&'a bstr> for BString
impl<'a> AddAssign<&'a bstr> for BString
Source§fn add_assign(&mut self, rhs: &bstr)
fn add_assign(&mut self, rhs: &bstr)
+=
operation. Read moreSource§impl<'a> AddAssign<&'a str> for BString
impl<'a> AddAssign<&'a str> for BString
Source§fn add_assign(&mut self, rhs: &str)
fn add_assign(&mut self, rhs: &str)
+=
operation. Read moreSource§impl<'a> Extend<&'a [u8]> for BString
impl<'a> Extend<&'a [u8]> for BString
Source§fn extend<I: IntoIterator<Item = &'a [u8]>>(&mut self, iter: I)
fn extend<I: IntoIterator<Item = &'a [u8]>>(&mut self, iter: I)
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one
)Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one
)Source§impl<'a> Extend<&'a bstr> for BString
impl<'a> Extend<&'a bstr> for BString
Source§fn extend<I: IntoIterator<Item = &'a bstr>>(&mut self, iter: I)
fn extend<I: IntoIterator<Item = &'a bstr>>(&mut self, iter: I)
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one
)Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one
)Source§impl<'a> Extend<&'a str> for BString
impl<'a> Extend<&'a str> for BString
Source§fn extend<I: IntoIterator<Item = &'a str>>(&mut self, iter: I)
fn extend<I: IntoIterator<Item = &'a str>>(&mut self, iter: I)
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one
)Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one
)Source§impl<'a> Extend<&'a u8> for BString
impl<'a> Extend<&'a u8> for BString
Source§fn extend<I: IntoIterator<Item = &'a u8>>(&mut self, iter: I)
fn extend<I: IntoIterator<Item = &'a u8>>(&mut self, iter: I)
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one
)Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one
)Source§impl<'a> Extend<BString> for BString
impl<'a> Extend<BString> for BString
Source§fn extend<I: IntoIterator<Item = BString>>(&mut self, iter: I)
fn extend<I: IntoIterator<Item = BString>>(&mut self, iter: I)
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one
)Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one
)Source§impl<'a> Extend<String> for BString
impl<'a> Extend<String> for BString
Source§fn extend<I: IntoIterator<Item = String>>(&mut self, iter: I)
fn extend<I: IntoIterator<Item = String>>(&mut self, iter: I)
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one
)Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one
)Source§impl<'a> Extend<Vec<u8>> for BString
impl<'a> Extend<Vec<u8>> for BString
Source§fn extend<I: IntoIterator<Item = Vec<u8>>>(&mut self, iter: I)
fn extend<I: IntoIterator<Item = Vec<u8>>>(&mut self, iter: I)
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one
)Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one
)Source§impl Extend<u8> for BString
impl Extend<u8> for BString
Source§fn extend<I: IntoIterator<Item = u8>>(&mut self, iter: I)
fn extend<I: IntoIterator<Item = u8>>(&mut self, iter: I)
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one
)Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one
)Source§impl FromIterator<u8> for BString
impl FromIterator<u8> for BString
Source§impl<'a> IntoIterator for &'a BString
impl<'a> IntoIterator for &'a BString
Source§impl<'a> IntoIterator for &'a mut BString
impl<'a> IntoIterator for &'a mut BString
Source§impl Ord for BString
impl Ord for BString
Source§impl PartialOrd for BString
impl PartialOrd for BString
impl Eq for BString
Auto Trait Implementations§
impl Freeze for BString
impl RefUnwindSafe for BString
impl Send for BString
impl Sync for BString
impl Unpin for BString
impl UnwindSafe for BString
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> ToBString for T
impl<T> ToBString for T
Source§fn to_bstring(&self) -> BString
fn to_bstring(&self) -> BString
BString
for the value.