Struct byte_str::ByteStr [] [src]

pub struct ByteStr { /* fields omitted */ }

Borrowed reference to a byte string. It provides similar functionality as str and [u8].

Methods

impl ByteStr
[src]

[src]

Creates an empty ByteStr.

[src]

Creates an empty mutable ByteStr.

[src]

Creates a ByteStr from a byte slice.

[src]

Create a mutable ByteStr from a byte slice.

[src]

Forms a ByteStr from a pointer and a length.

[src]

Forms a mutable ByteStr from a pointer and a length.

[src]

Converts self into a byte slice.

[src]

Converts self into a mutable byte slice.

[src]

Copies the self into a Vec.

[src]

Copies the self into a ByteString.

[src]

Converts self into a boxed slice without clones or allocation.

[src]

Converts self into a vector without clones or allocation.

[src]

Converts self into a ByteString without clones or allocation.

[src]

Returns the length of self.

[src]

Returns true if the length of self is zero.

[src]

Converts self into a raw pointer that points to the first byte of the string.

[src]

Converts self into a mutable raw pointer that points to the first byte of the string.

[src]

Returns a reference to an element of the slice, or None if the index is out of bounds.

[src]

Returns a mutable reference to an element of the slice, or None if the index is out of bounds.

[src]

Returns a reference to the first byte of the string, or None if it is empty.

[src]

Returns a mutable reference to the first byte of the string, or None if it is empty.

[src]

Returns a reference to the last byte of the string, or None if it is empty.

[src]

Returns a mutable reference to the last byte of the string, or None if it is empty.

[src]

Returns the first and all the rest of the bytes of the slice, or None if it is empty.

[src]

Returns the first and all the rest of the bytes of the slice, or None if it is empty.

[src]

Returns the last and all the rest of the bytes of the slice, or None if it is empty.

[src]

Returns the last and all the rest of the bytes of the slice, or None if it is empty.

[src]

Returns an iterator over the string.

[src]

Returns an iterator that allows modifying each value.

[src]

Returns an iterator over all contiguous windows of length size. The windows overlap. If the string is shorter than size, the iterator returns no values.

Similar to slice::windows().

[src]

Returns an iterator over size bytes of the string at a time. The chunks do not overlap. If size does not divide the length of the slice, then the last chunk will not have length size.

Similar to slice::chunks().

[src]

Returns an iterator over size elements of the slice at a time. The chunks are mutable strings and do not overlap. If size does not divide the length of the slice, then the last chunk will not have length size.

Similar to slice::chunks_mut().

[src]

Divides one string into two at an index.

The first will contain all indices from [0, mid) (excluding the index mid itself) and the second will contain all indices from [mid, len) (excluding the index len itself).

Similar to slice::split_at().

Panics

Panics if mid > len.

[src]

Divides one &mut string into two at an index.

The first will contain all indices from [0, mid) (excluding the index mid itself) and the second will contain all indices from [mid, len) (excluding the index len itself).

Similar to slice::split_at_mut().

Panics

Panics if mid > len.

[src]

Returns an iterator over substrings of this string, separated by a matcher.

[src]

Returns an iterator over mutable substrings of this string, separated by a matcher.

[src]

Returns an iterator over substrings of this string, separated by a matcher, starting at the end of the slice and working backwards.

[src]

Returns an iterator over mutable substrings of this string, separated by a matcher, starting at the end of the slice and working backwards.

[src]

Returns an iterator over substrings of this string, separated by a matcher, returning at most n items.

If n substrings are returned, the last substring will contain the remainder of the string.

[src]

Returns an iterator over mutable substrings of this string, separated by a matcher, returning at most n items.

If n substrings are returned, the last substring will contain the remainder of the string.

[src]

Returns an iterator over substrings of this string, separated by a matcher and stating from the end of the string, returning at most n items.

If n substrings are returned, the last substring will contain the remainder of the string.

[src]

Returns an iterator over mutable substrings of this string, separated by a matcher and stating from the end of the string, returning at most n items.

If n substrings are returned, the last substring will contain the remainder of the string.

[src]

Returns an iterator over the disjoint matches within the given string.

[src]

Returns an iterator over the mutable disjoint matches within the given string.

[src]

Returns an iterator over the disjoint matches within the given string, yielded in reverse order.

[src]

Returns an iterator over the mutable disjoint matches within the given string, yielded in reverse order.

[src]

Returns an iterator over the disjoint matches within the given string, as well as the index that the match starts at.

[src]

Returns an iterator over the mutable disjoint matches within the given string, as well as the index that the match starts at.

[src]

Returns an iterator over the disjoint matches within the given string, yielded in reverse order, as well as the index that the match starts at.

[src]

Returns an iterator over the mutable disjoint matches within the given string, yielded in reverse order, as well as the index that the match starts at.

[src]

Returns true if the string contains a substring that matches the given matcher.

[src]

Returns true if the string beginning a matches the given matcher.

[src]

Returns true if the string ending a matches the given matcher.

[src]

Returns the byte index of the first character of self that matches the matcher or None it it doesn't match.

[src]

Returns the byte index of the last character of self that matches the matcher or None it it doesn't match.

[src]

Swaps two bytes in the string, indexed by a and b.

Panics

Panics if a or b are out of bounds.

[src]

Reverses the order of bytes in the slice.

[src]

Copies all elements from src into self, using a memcpy.

The length of src must be the same as self.

[src]

Copies all elements from src into self, using a memcpy.

The length of src must be the same as self.

Trait Implementations

impl PartialEq for ByteStr
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl Eq for ByteStr
[src]

impl<'a> Default for &'a ByteStr
[src]

[src]

Returns the "default value" for a type. Read more

impl<'a> Default for &'a mut ByteStr
[src]

[src]

Returns the "default value" for a type. Read more

impl Debug for ByteStr
[src]

[src]

Formats the value using the given formatter.

impl ToOwned for ByteStr
[src]

[src]

Creates owned data from borrowed data, usually by cloning. Read more

[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

impl AsRef<ByteStr> for ByteStr
[src]

[src]

Performs the conversion.

impl AsRef<[u8]> for ByteStr
[src]

[src]

Performs the conversion.

impl AsMut<ByteStr> for ByteStr
[src]

[src]

Performs the conversion.

impl AsMut<[u8]> for ByteStr
[src]

[src]

Performs the conversion.

impl<'a> PartialEq<ByteStr> for &'a ByteStr
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl PartialEq<[u8]> for ByteStr
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl<'a> PartialEq<[u8]> for &'a ByteStr
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl PartialEq<[u8; 0]> for ByteStr
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl<'a> PartialEq<[u8; 0]> for &'a ByteStr
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl PartialEq<[u8; 1]> for ByteStr
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl<'a> PartialEq<[u8; 1]> for &'a ByteStr
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl PartialEq<[u8; 2]> for ByteStr
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl<'a> PartialEq<[u8; 2]> for &'a ByteStr
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl PartialEq<[u8; 3]> for ByteStr
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl<'a> PartialEq<[u8; 3]> for &'a ByteStr
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl PartialEq<[u8; 4]> for ByteStr
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl<'a> PartialEq<[u8; 4]> for &'a ByteStr
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl PartialEq<[u8; 5]> for ByteStr
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl<'a> PartialEq<[u8; 5]> for &'a ByteStr
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl PartialEq<[u8; 6]> for ByteStr
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl<'a> PartialEq<[u8; 6]> for &'a ByteStr
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl PartialEq<[u8; 7]> for ByteStr
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl<'a> PartialEq<[u8; 7]> for &'a ByteStr
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl PartialEq<[u8; 8]> for ByteStr
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl<'a> PartialEq<[u8; 8]> for &'a ByteStr
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl PartialEq<[u8; 9]> for ByteStr
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl<'a> PartialEq<[u8; 9]> for &'a ByteStr
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl PartialEq<[u8; 10]> for ByteStr
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl<'a> PartialEq<[u8; 10]> for &'a ByteStr
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl PartialEq<[u8; 11]> for ByteStr
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl<'a> PartialEq<[u8; 11]> for &'a ByteStr
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl PartialEq<[u8; 12]> for ByteStr
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl<'a> PartialEq<[u8; 12]> for &'a ByteStr
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl PartialEq<[u8; 13]> for ByteStr
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl<'a> PartialEq<[u8; 13]> for &'a ByteStr
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl PartialEq<[u8; 14]> for ByteStr
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl<'a> PartialEq<[u8; 14]> for &'a ByteStr
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl PartialEq<[u8; 15]> for ByteStr
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl<'a> PartialEq<[u8; 15]> for &'a ByteStr
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl PartialEq<[u8; 16]> for ByteStr
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl<'a> PartialEq<[u8; 16]> for &'a ByteStr
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl PartialEq<[u8; 17]> for ByteStr
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl<'a> PartialEq<[u8; 17]> for &'a ByteStr
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl PartialEq<[u8; 18]> for ByteStr
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl<'a> PartialEq<[u8; 18]> for &'a ByteStr
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl PartialEq<[u8; 19]> for ByteStr
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl<'a> PartialEq<[u8; 19]> for &'a ByteStr
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl PartialEq<[u8; 20]> for ByteStr
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl<'a> PartialEq<[u8; 20]> for &'a ByteStr
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl PartialEq<[u8; 21]> for ByteStr
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl<'a> PartialEq<[u8; 21]> for &'a ByteStr
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl PartialEq<[u8; 22]> for ByteStr
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl<'a> PartialEq<[u8; 22]> for &'a ByteStr
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl PartialEq<[u8; 23]> for ByteStr
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl<'a> PartialEq<[u8; 23]> for &'a ByteStr
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl PartialEq<[u8; 24]> for ByteStr
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl<'a> PartialEq<[u8; 24]> for &'a ByteStr
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl PartialEq<[u8; 25]> for ByteStr
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl<'a> PartialEq<[u8; 25]> for &'a ByteStr
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl PartialEq<[u8; 26]> for ByteStr
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl<'a> PartialEq<[u8; 26]> for &'a ByteStr
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl PartialEq<[u8; 27]> for ByteStr
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl<'a> PartialEq<[u8; 27]> for &'a ByteStr
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl PartialEq<[u8; 28]> for ByteStr
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl<'a> PartialEq<[u8; 28]> for &'a ByteStr
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl PartialEq<[u8; 29]> for ByteStr
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl<'a> PartialEq<[u8; 29]> for &'a ByteStr
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl PartialEq<[u8; 30]> for ByteStr
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl<'a> PartialEq<[u8; 30]> for &'a ByteStr
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl PartialEq<[u8; 31]> for ByteStr
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl<'a> PartialEq<[u8; 31]> for &'a ByteStr
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl PartialEq<[u8; 32]> for ByteStr
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl<'a> PartialEq<[u8; 32]> for &'a ByteStr
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl PartialEq<ByteString> for ByteStr
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl<'a> PartialEq<ByteString> for &'a ByteStr
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl<'b> PartialEq<Cow<'b, ByteStr>> for ByteStr
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl<'a, 'b> PartialEq<Cow<'b, ByteStr>> for &'a ByteStr
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl<'a, T: ?Sized> PartialEq<&'a T> for ByteStr where
    ByteStr: PartialEq<T>, 
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl Index<usize> for ByteStr
[src]

The returned type after indexing.

[src]

Performs the indexing (container[index]) operation.

impl Index<Range<usize>> for ByteStr
[src]

The returned type after indexing.

[src]

Performs the indexing (container[index]) operation.

impl Index<RangeFrom<usize>> for ByteStr
[src]

The returned type after indexing.

[src]

Performs the indexing (container[index]) operation.

impl Index<RangeTo<usize>> for ByteStr
[src]

The returned type after indexing.

[src]

Performs the indexing (container[index]) operation.

impl Index<RangeFull> for ByteStr
[src]

The returned type after indexing.

[src]

Performs the indexing (container[index]) operation.

impl IndexMut<usize> for ByteStr
[src]

[src]

Performs the mutable indexing (container[index]) operation.

impl IndexMut<Range<usize>> for ByteStr
[src]

[src]

Performs the mutable indexing (container[index]) operation.

impl IndexMut<RangeFrom<usize>> for ByteStr
[src]

[src]

Performs the mutable indexing (container[index]) operation.

impl IndexMut<RangeTo<usize>> for ByteStr
[src]

[src]

Performs the mutable indexing (container[index]) operation.

impl IndexMut<RangeFull> for ByteStr
[src]

[src]

Performs the mutable indexing (container[index]) operation.

impl<'a> IntoIterator for &'a ByteStr
[src]

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

[src]

Creates an iterator from a value. Read more

impl<'a> IntoIterator for &'a mut ByteStr
[src]

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

[src]

Creates an iterator from a value. Read more