Struct bytes::Bytes [] [src]

pub struct Bytes { /* fields omitted */ }

A specialized ByteStr box.

Methods

impl Bytes
[src]

If the underlying ByteStr is of type B, returns a reference to it otherwise None.

If the underlying ByteStr is of type B, returns the unwraped value, otherwise, returns the original Bytes as Err.

Trait Implementations

impl ByteStr for Bytes
[src]

Returns a read-only Buf for accessing the byte contents of the ByteStr. Read more

Returns a new Bytes value representing the concatenation of self with the given Bytes. Read more

Returns the number of bytes in the ByteStr

Returns a new ByteStr value containing the byte range between begin (inclusive) and end (exclusive) Read more

Divides the value into two Bytes at the given index. Read more

Returns true if the length of the ByteStr is 0

Returns a new ByteStr value containing the byte range starting from begin (inclusive) to the end of the byte str. Read more

Returns a new ByteStr value containing the byte range from the start up to end (exclusive). Read more

impl ToBytes for Bytes
[src]

Consumes the value and returns a Bytes instance containing identical bytes Read more

impl Index<usize> for Bytes
[src]

The returned type after indexing

The method for the indexing (container[index]) operation

impl Debug for Bytes
[src]

Formats the value using the given formatter.

impl Clone for Bytes
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Drop for Bytes
[src]

A method called when the value goes out of scope. Read more

impl Send for Bytes
[src]

impl Sync for Bytes
[src]

impl<'a> Source for &'a Bytes
[src]

impl<B: ByteStr> PartialEq<B> for Bytes
[src]

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

This method tests for !=.

impl Eq for Bytes
[src]