Struct bytes::str::SeqByteStr [] [src]

pub struct SeqByteStr {
    // some fields omitted
}

Methods

impl SeqByteStr

fn from_slice(bytes: &[u8]) -> SeqByteStr

Create a new SeqByteStr from a byte slice.

The contents of the byte slice will be copied.

unsafe fn from_mem_ref(mem: MemRef, pos: u32, len: u32) -> SeqByteStr

Creates a new SeqByteStr from a MemRef, an offset, and a length.

This function is unsafe as there are no guarantees that the given arguments are valid.

Trait Implementations

impl ByteStr for SeqByteStr

type Buf = ROByteBuf

fn buf(&self) -> ROByteBuf

fn concat<B: ByteStr + 'static>(&self, other: &B) -> Bytes

fn len(&self) -> usize

fn slice(&self, begin: usize, end: usize) -> Bytes

fn is_empty(&self) -> bool

fn slice_from(&self, begin: usize) -> Bytes

fn slice_to(&self, end: usize) -> Bytes

fn split_at(&self, mid: usize) -> (Bytes, Bytes)

impl ToBytes for SeqByteStr

fn to_bytes(self) -> Bytes

impl Index<usize> for SeqByteStr

type Output = u8

fn index(&self, index: usize) -> &u8

impl Clone for SeqByteStr

fn clone(&self) -> SeqByteStr

1.0.0fn clone_from(&mut self, source: &Self)

impl<B: ByteStr> PartialEq<B> for SeqByteStr

fn eq(&self, other: &B) -> bool

fn ne(&self, other: &B) -> bool