Struct bstring::bstring::BString
[−]
[src]
pub struct BString { /* fields omitted */ }
A growable byte string of unknown encoding.
It is analogous to the standard String
type.
Its borrowed slice counterpart is the bstr
type.
Methods
impl BString
[src]
fn new() -> BString
Creates a new empty BString
.
fn with_capacity(n: usize) -> BString
Creates a new empty BString
with the given capacity.
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");
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");
unsafe fn from_raw_parts(
ptr: *mut u8,
length: usize,
capacity: usize
) -> BString
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.
fn as_bstr(&self) -> &bstr
Returns a borrowed &bstr
slice containing the entire string.
fn as_mut_bstr(&mut self) -> &mut bstr
Returns a mutable &bstr
slice containing the entire string.
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
.
fn into_bytes(self) -> Vec<u8>
Consumes the BString
and returns the internal Vec<u8>
.
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.
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");
fn capacity(&self) -> usize
Returns the capacity of this BString
, in bytes.
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
.
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
.
fn shrink_to_fit(&mut self)
Shrinks the capacity of the BString
to match its length.
fn push(&mut self, b: u8)
Appends the given byte to end of this BString
.
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");
fn pop(&mut self) -> Option<u8>
Removes and returns the last byte of the string.
Returns None
if the string is empty.
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.
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");
fn insert(&mut self, idx: usize, b: u8)
Inserts the given byte at position idx
.
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");
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.
fn clear(&mut self)
Truncates this BString
, removing all contents.
The BString
will have a length of zero, but its capacity will be
unaffected.
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>
fn len(&self) -> usize
Returns the length of the string, in bytes.
fn is_empty(&self) -> bool
Returns whether the string is empty.
fn as_bytes(&self) -> &[u8]
Returns a borrowed reference to the internal byte slice.
fn as_mut_bytes(&mut self) -> &mut [u8]
Returns a mutable reference to the internal byte slice.
fn as_ptr(&self) -> *const u8
Returns a raw pointer to the contained buffer.
fn as_mut_ptr(&mut self) -> *mut u8
Returns a raw mutable pointer to the contained buffer.
fn to_bstring(&self) -> BString
Returns a newly allocated BString
buffer for the
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.
unsafe fn to_str_unchecked(&self) -> &str
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 �
fn display(&self) -> Display
Returns an object that implements Display
for safely printing
byte strings that may contain non-UTF-8 data.
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.
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.
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
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
fn first(&self) -> Option<&u8>
Returns a borrowed reference to the first byte in the string.
Returns None
if the byte string is empty.
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.
fn last(&self) -> Option<&u8>
Returns a borrowed reference to the last byte in the string.
Returns None
if the byte string is empty.
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.
fn iter(&self) -> Iter
Returns an iterator over the bytes of this string.
The element type of the returned iterator is &u8
.
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
.
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.
fn trim(&self) -> &bstr
Returns a subslice with leading and trailing whitespace removed.
fn trim_left(&self) -> &bstr
Returns a subslice with leading whitespace removed.
fn trim_right(&self) -> &bstr
Returns a subslice with trailing whitespace removed.
fn trim_matches<'a, P: Pattern<'a>>(&'a self, pat: P) -> &bstr where
P::Searcher: DoubleEndedSearcher<'a>,
P::Searcher: DoubleEndedSearcher<'a>,
Returns a subslice with all matching prefixes and suffixes removed.
fn trim_left_matches<'a, P: Pattern<'a>>(&'a self, pat: P) -> &bstr
Returns a subslice with all matching prefixes removed.
fn trim_right_matches<'a, P: Pattern<'a>>(&'a self, pat: P) -> &bstr where
P::Searcher: ReverseSearcher<'a>,
P::Searcher: ReverseSearcher<'a>,
Returns a subslice with all matching suffixes removed.
fn partition<'a, P: Pattern<'a>>(
&'a self,
pat: P
) -> Option<(&'a bstr, &'a bstr)>
&'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");
fn rpartition<'a, P: Pattern<'a>>(
&'a self,
pat: P
) -> Option<(&'a bstr, &'a bstr)> where
P::Searcher: ReverseSearcher<'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");
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.
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.
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.
fn rsplitn<'a, P: Pattern<'a>>(&'a self, count: usize, pat: P) -> RSplitN<'a, P> where
P::Searcher: ReverseSearcher<'a>,
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.
fn split_terminator<'a, P: Pattern<'a>>(
&'a self,
pat: P
) -> SplitTerminator<'a, P>
&'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.
fn rsplit_terminator<'a, P: Pattern<'a>>(
&'a self,
pat: P
) -> RSplitTerminator<'a, P> where
P::Searcher: ReverseSearcher<'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.
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);
fn matches<'a, P: Pattern<'a>>(&'a self, pat: P) -> Matches<'a, P>
Returns an iterator over matches in the byte string.
fn rmatches<'a, P: Pattern<'a>>(&'a self, pat: P) -> RMatches<'a, P>
Returns a reverse iterator over matches in the byte string.
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.
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.
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.
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.
fn split_first(&self) -> Option<(&u8, &bstr)>
Returns the first byte and the rest,
or None
if the byte string is empty.
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.
fn split_last(&self) -> Option<(&u8, &bstr)>
Returns the last byte and the rest,
or None
if the byte string is empty.
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.
fn contains<'a, P: Pattern<'a>>(&'a self, pat: P) -> bool
Returns whether the byte string contains the given pattern.
fn starts_with<'a, P: Pattern<'a>>(&'a self, pat: P) -> bool
Returns whether the byte string starts with the given pattern.
fn ends_with<'a, P: Pattern<'a>>(&'a self, pat: P) -> bool where
P::Searcher: ReverseSearcher<'a>,
P::Searcher: ReverseSearcher<'a>,
Returns whether the byte string ends with the given pattern.
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.
fn rfind<'a, P: Pattern<'a>>(&'a self, pat: P) -> Option<usize> where
P::Searcher: ReverseSearcher<'a>,
P::Searcher: ReverseSearcher<'a>,
Returns the index of the first match of the given pattern, starting from the end.
Returns None
if there is no match.
fn parse<F: FromBStr>(&self) -> Result<F, F::Err>
Returns a value parsed from the byte string,
using the FromBStr
trait
fn into_bstring(self: Box<bstr>) -> BString
Converts a Box<bstr>
into a BString
.
Trait Implementations
impl Display for BString
[src]
impl Clone for BString
[src]
fn clone(&self) -> BString
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Default for BString
[src]
impl Hash for BString
[src]
fn hash<__H: Hasher>(&self, __arg_0: &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
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Deref for BString
[src]
type Target = bstr
The resulting type after dereferencing
fn deref(&self) -> &bstr
The method called to dereference a value
impl DerefMut for BString
[src]
impl<'a> From<&'a str> for BString
[src]
impl<'a> From<&'a [u8]> for BString
[src]
impl<'a> From<&'a bstr> for BString
[src]
impl From<String> for BString
[src]
impl From<Vec<u8>> for BString
[src]
impl AsRef<bstr> for BString
[src]
impl AsMut<bstr> for BString
[src]
impl Borrow<bstr> for BString
[src]
impl Debug for BString
[src]
impl<'a> Add<&'a bstr> for BString
[src]
type Output = Self
The resulting type after applying the +
operator
fn add(self, rhs: &bstr) -> Self
The method for the +
operator
impl<'a> Add<&'a str> for BString
[src]
type Output = Self
The resulting type after applying the +
operator
fn add(self, rhs: &str) -> Self
The method for the +
operator
impl<'a> Add<&'a [u8]> for BString
[src]
type Output = Self
The resulting type after applying the +
operator
fn add(self, rhs: &[u8]) -> Self
The method for the +
operator
impl<'a> AddAssign<&'a bstr> for BString
[src]
fn add_assign(&mut self, rhs: &bstr)
The method for the +=
operator
impl<'a> AddAssign<&'a str> for BString
[src]
fn add_assign(&mut self, rhs: &str)
The method for the +=
operator
impl<'a> AddAssign<&'a [u8]> for BString
[src]
fn add_assign(&mut self, rhs: &[u8])
The method for the +=
operator
impl Extend<u8> for BString
[src]
fn extend<I: IntoIterator<Item = u8>>(&mut self, iter: I)
Extends a collection with the contents of an iterator. Read more
impl<'a> Extend<&'a u8> for BString
[src]
fn extend<I: IntoIterator<Item = &'a u8>>(&mut self, iter: I)
Extends a collection with the contents of an iterator. Read more
impl<'a> Extend<&'a bstr> for BString
[src]
fn extend<I: IntoIterator<Item = &'a bstr>>(&mut self, iter: I)
Extends a collection with the contents of an iterator. Read more
impl<'a> Extend<BString> for BString
[src]
fn extend<I: IntoIterator<Item = BString>>(&mut self, iter: I)
Extends a collection with the contents of an iterator. Read more
impl<'a> Extend<&'a str> for BString
[src]
fn extend<I: IntoIterator<Item = &'a str>>(&mut self, iter: I)
Extends a collection with the contents of an iterator. Read more
impl<'a> Extend<String> for BString
[src]
fn extend<I: IntoIterator<Item = String>>(&mut self, iter: I)
Extends a collection with the contents of an iterator. Read more
impl<'a> Extend<&'a [u8]> for BString
[src]
fn extend<I: IntoIterator<Item = &'a [u8]>>(&mut self, iter: I)
Extends a collection with the contents of an iterator. Read more
impl<'a> Extend<Vec<u8>> for BString
[src]
fn extend<I: IntoIterator<Item = Vec<u8>>>(&mut self, iter: I)
Extends a collection with the contents of an iterator. Read more
impl FromBStr for BString
[src]
type Err = ParseError
Error type returned from a failed parsing attempt.
fn from_bstr(s: &bstr) -> Result<BString, ParseError>
Parses a bstr
to return this value.
impl FromIterator<u8> for BString
[src]
fn from_iter<I: IntoIterator<Item = u8>>(iter: I) -> BString
Creates a value from an iterator. Read more
impl Index<usize> for BString
[src]
type Output = u8
The returned type after indexing
fn index(&self, idx: usize) -> &u8
The method for the indexing (container[index]
) operation
impl Index<Range<usize>> for BString
[src]
type Output = bstr
The returned type after indexing
fn index(&self, r: Range<usize>) -> &bstr
The method for the indexing (container[index]
) operation
impl Index<RangeFrom<usize>> for BString
[src]
type Output = bstr
The returned type after indexing
fn index(&self, r: RangeFrom<usize>) -> &bstr
The method for the indexing (container[index]
) operation
impl Index<RangeTo<usize>> for BString
[src]
type Output = bstr
The returned type after indexing
fn index(&self, r: RangeTo<usize>) -> &bstr
The method for the indexing (container[index]
) operation
impl Index<RangeFull> for BString
[src]
type Output = bstr
The returned type after indexing
fn index(&self, r: RangeFull) -> &bstr
The method for the indexing (container[index]
) operation
impl IndexMut<usize> for BString
[src]
fn index_mut(&mut self, idx: usize) -> &mut u8
The method for the mutable indexing (container[index]
) operation
impl IndexMut<Range<usize>> for BString
[src]
fn index_mut(&mut self, r: Range<usize>) -> &mut bstr
The method for the mutable indexing (container[index]
) operation
impl IndexMut<RangeFrom<usize>> for BString
[src]
fn index_mut(&mut self, r: RangeFrom<usize>) -> &mut bstr
The method for the mutable indexing (container[index]
) operation
impl IndexMut<RangeTo<usize>> for BString
[src]
fn index_mut(&mut self, r: RangeTo<usize>) -> &mut bstr
The method for the mutable indexing (container[index]
) operation
impl IndexMut<RangeFull> for BString
[src]
fn index_mut(&mut self, r: RangeFull) -> &mut bstr
The method for the mutable indexing (container[index]
) operation
impl<'a> IntoIterator for &'a BString
[src]
type Item = &'a u8
The type of the elements being iterated over.
type IntoIter = Iter<'a>
Which kind of iterator are we turning this into?
fn into_iter(self) -> Self::IntoIter
Creates an iterator from a value. Read more
impl<'a> IntoIterator for &'a mut BString
[src]
type Item = &'a mut u8
The type of the elements being iterated over.
type IntoIter = IterMut<'a>
Which kind of iterator are we turning this into?
fn into_iter(self) -> Self::IntoIter
Creates an iterator from a value. Read more
impl Eq for BString
[src]
impl<'a, 'b> PartialEq<BString> for BString
[src]
fn eq(&self, rhs: &BString) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, rhs: &BString) -> bool
This method tests for !=
.
impl<'a, 'b> PartialEq<bstr> for BString
[src]
fn eq(&self, rhs: &bstr) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, rhs: &bstr) -> bool
This method tests for !=
.
impl<'a, 'b> PartialEq<&'a bstr> for BString
[src]
fn eq(&self, rhs: &&'a bstr) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, rhs: &&'a bstr) -> bool
This method tests for !=
.
impl<'a, 'b> PartialEq<Cow<'a, bstr>> for BString
[src]
fn eq(&self, rhs: &Cow<'a, bstr>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, rhs: &Cow<'a, bstr>) -> bool
This method tests for !=
.
impl<'a, 'b> PartialEq<String> for BString
[src]
fn eq(&self, rhs: &String) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, rhs: &String) -> bool
This method tests for !=
.
impl<'a, 'b> PartialEq<str> for BString
[src]
fn eq(&self, rhs: &str) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, rhs: &str) -> bool
This method tests for !=
.
impl<'a, 'b> PartialEq<&'a str> for BString
[src]
fn eq(&self, rhs: &&'a str) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, rhs: &&'a str) -> bool
This method tests for !=
.
impl<'a, 'b> PartialEq<Cow<'a, str>> for BString
[src]
fn eq(&self, rhs: &Cow<'a, str>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, rhs: &Cow<'a, str>) -> bool
This method tests for !=
.
impl PartialEq<Vec<u8>> for BString
[src]
fn eq(&self, rhs: &Vec<u8>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, rhs: &Vec<u8>) -> bool
This method tests for !=
.
impl PartialEq<[u8]> for BString
[src]
fn eq(&self, rhs: &[u8]) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, rhs: &[u8]) -> bool
This method tests for !=
.
impl<'a> PartialEq<[u8; 0]> for BString
[src]
fn eq(&self, rhs: &[u8; 0]) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, rhs: &[u8; 0]) -> bool
This method tests for !=
.
impl<'a, 'b> PartialEq<&'b [u8; 0]> for BString
[src]
fn eq(&self, rhs: &&[u8; 0]) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, rhs: &&[u8; 0]) -> bool
This method tests for !=
.
impl<'a> PartialEq<[u8; 1]> for BString
[src]
fn eq(&self, rhs: &[u8; 1]) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, rhs: &[u8; 1]) -> bool
This method tests for !=
.
impl<'a, 'b> PartialEq<&'b [u8; 1]> for BString
[src]
fn eq(&self, rhs: &&[u8; 1]) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, rhs: &&[u8; 1]) -> bool
This method tests for !=
.
impl<'a> PartialEq<[u8; 2]> for BString
[src]
fn eq(&self, rhs: &[u8; 2]) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, rhs: &[u8; 2]) -> bool
This method tests for !=
.
impl<'a, 'b> PartialEq<&'b [u8; 2]> for BString
[src]
fn eq(&self, rhs: &&[u8; 2]) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, rhs: &&[u8; 2]) -> bool
This method tests for !=
.
impl<'a> PartialEq<[u8; 3]> for BString
[src]
fn eq(&self, rhs: &[u8; 3]) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, rhs: &[u8; 3]) -> bool
This method tests for !=
.
impl<'a, 'b> PartialEq<&'b [u8; 3]> for BString
[src]
fn eq(&self, rhs: &&[u8; 3]) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, rhs: &&[u8; 3]) -> bool
This method tests for !=
.
impl<'a> PartialEq<[u8; 4]> for BString
[src]
fn eq(&self, rhs: &[u8; 4]) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, rhs: &[u8; 4]) -> bool
This method tests for !=
.
impl<'a, 'b> PartialEq<&'b [u8; 4]> for BString
[src]
fn eq(&self, rhs: &&[u8; 4]) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, rhs: &&[u8; 4]) -> bool
This method tests for !=
.
impl<'a> PartialEq<[u8; 5]> for BString
[src]
fn eq(&self, rhs: &[u8; 5]) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, rhs: &[u8; 5]) -> bool
This method tests for !=
.
impl<'a, 'b> PartialEq<&'b [u8; 5]> for BString
[src]
fn eq(&self, rhs: &&[u8; 5]) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, rhs: &&[u8; 5]) -> bool
This method tests for !=
.
impl<'a> PartialEq<[u8; 6]> for BString
[src]
fn eq(&self, rhs: &[u8; 6]) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, rhs: &[u8; 6]) -> bool
This method tests for !=
.
impl<'a, 'b> PartialEq<&'b [u8; 6]> for BString
[src]
fn eq(&self, rhs: &&[u8; 6]) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, rhs: &&[u8; 6]) -> bool
This method tests for !=
.
impl<'a> PartialEq<[u8; 7]> for BString
[src]
fn eq(&self, rhs: &[u8; 7]) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, rhs: &[u8; 7]) -> bool
This method tests for !=
.
impl<'a, 'b> PartialEq<&'b [u8; 7]> for BString
[src]
fn eq(&self, rhs: &&[u8; 7]) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, rhs: &&[u8; 7]) -> bool
This method tests for !=
.
impl<'a> PartialEq<[u8; 8]> for BString
[src]
fn eq(&self, rhs: &[u8; 8]) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, rhs: &[u8; 8]) -> bool
This method tests for !=
.
impl<'a, 'b> PartialEq<&'b [u8; 8]> for BString
[src]
fn eq(&self, rhs: &&[u8; 8]) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, rhs: &&[u8; 8]) -> bool
This method tests for !=
.
impl<'a> PartialEq<[u8; 9]> for BString
[src]
fn eq(&self, rhs: &[u8; 9]) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, rhs: &[u8; 9]) -> bool
This method tests for !=
.
impl<'a, 'b> PartialEq<&'b [u8; 9]> for BString
[src]
fn eq(&self, rhs: &&[u8; 9]) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, rhs: &&[u8; 9]) -> bool
This method tests for !=
.
impl<'a> PartialEq<[u8; 10]> for BString
[src]
fn eq(&self, rhs: &[u8; 10]) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, rhs: &[u8; 10]) -> bool
This method tests for !=
.
impl<'a, 'b> PartialEq<&'b [u8; 10]> for BString
[src]
fn eq(&self, rhs: &&[u8; 10]) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, rhs: &&[u8; 10]) -> bool
This method tests for !=
.
impl<'a> PartialEq<[u8; 11]> for BString
[src]
fn eq(&self, rhs: &[u8; 11]) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, rhs: &[u8; 11]) -> bool
This method tests for !=
.
impl<'a, 'b> PartialEq<&'b [u8; 11]> for BString
[src]
fn eq(&self, rhs: &&[u8; 11]) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, rhs: &&[u8; 11]) -> bool
This method tests for !=
.
impl<'a> PartialEq<[u8; 12]> for BString
[src]
fn eq(&self, rhs: &[u8; 12]) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, rhs: &[u8; 12]) -> bool
This method tests for !=
.
impl<'a, 'b> PartialEq<&'b [u8; 12]> for BString
[src]
fn eq(&self, rhs: &&[u8; 12]) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, rhs: &&[u8; 12]) -> bool
This method tests for !=
.
impl<'a> PartialEq<[u8; 13]> for BString
[src]
fn eq(&self, rhs: &[u8; 13]) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, rhs: &[u8; 13]) -> bool
This method tests for !=
.
impl<'a, 'b> PartialEq<&'b [u8; 13]> for BString
[src]
fn eq(&self, rhs: &&[u8; 13]) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, rhs: &&[u8; 13]) -> bool
This method tests for !=
.
impl<'a> PartialEq<[u8; 14]> for BString
[src]
fn eq(&self, rhs: &[u8; 14]) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, rhs: &[u8; 14]) -> bool
This method tests for !=
.
impl<'a, 'b> PartialEq<&'b [u8; 14]> for BString
[src]
fn eq(&self, rhs: &&[u8; 14]) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, rhs: &&[u8; 14]) -> bool
This method tests for !=
.
impl<'a> PartialEq<[u8; 15]> for BString
[src]
fn eq(&self, rhs: &[u8; 15]) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, rhs: &[u8; 15]) -> bool
This method tests for !=
.
impl<'a, 'b> PartialEq<&'b [u8; 15]> for BString
[src]
fn eq(&self, rhs: &&[u8; 15]) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, rhs: &&[u8; 15]) -> bool
This method tests for !=
.
impl<'a> PartialEq<[u8; 16]> for BString
[src]
fn eq(&self, rhs: &[u8; 16]) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, rhs: &[u8; 16]) -> bool
This method tests for !=
.
impl<'a, 'b> PartialEq<&'b [u8; 16]> for BString
[src]
fn eq(&self, rhs: &&[u8; 16]) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, rhs: &&[u8; 16]) -> bool
This method tests for !=
.
impl Ord for BString
[src]
fn cmp(&self, rhs: &BString) -> Ordering
This method returns an Ordering
between self
and other
. Read more
impl PartialOrd for BString
[src]
fn partial_cmp(&self, rhs: &BString) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, rhs: &BString) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn gt(&self, rhs: &BString) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn le(&self, rhs: &BString) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn ge(&self, rhs: &BString) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more