Struct slice_deque::Buffer[][src]

pub struct Buffer<T> { /* fields omitted */ }

Mirrored memory buffer of length len.

The buffer elements in range [0, len/2) are mirrored into the range [len/2, len).

Methods

impl<T> Buffer<T>
[src]

Number of elements in the buffer.

Is the buffer empty?

Pointer to the first element in the buffer.

Interprets contents as a slice.

Warning: Some memory might be uninitialized.

Interprets contents as a mut slice.

Warning: Some memory might be uninitialized.

Interprets content as a slice and access the i-th element.

Warning: The memory of the i-th element might be uninitialized.

Interprets content as a mut slice and access the i-th element.

Warning: The memory of the i-th element might be uninitialized.

Creates a new empty Buffer.

Creates a new empty Buffer from a ptr and a len.

Panics

If ptr is null.

Create a mirrored buffer containing len Ts where the first half of the buffer is mirrored into the second half.

Trait Implementations

impl<T> Drop for Buffer<T>
[src]

Executes the destructor for this type. Read more

impl<T> Clone for Buffer<T> where
    T: Clone
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<T> Default for Buffer<T>
[src]

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

impl<T> Send for Buffer<T> where
    T: Send
[src]

impl<T> Sync for Buffer<T> where
    T: Sync
[src]