Struct crayon::utils::data_buf::DataBuffer
[−]
[src]
pub struct DataBuffer(_, _);
Where we store all the intermediate bytes.
Methods
impl DataBuffer
[src]
fn with_capacity(capacity: usize) -> Self
[src]
Creates a new task buffer with specified capacity.
fn clear(&mut self)
[src]
fn extend<T>(&mut self, value: &T) -> DataBufferPtr<T> where
T: Copy,
[src]
T: Copy,
fn extend_from_slice<T>(&mut self, slice: &[T]) -> DataBufferPtr<[T]> where
T: Copy,
[src]
T: Copy,
Clones and appends all elements in a slice to the buffer.
fn extend_from_str<T>(&mut self, value: T) -> DataBufferPtr<str> where
T: Borrow<str>,
[src]
T: Borrow<str>,
Clones and append all bytes in a string slice to the buffer.
fn as_ref<T>(&self, ptr: DataBufferPtr<T>) -> &T where
T: Copy,
[src]
T: Copy,
Returns reference to object indicated by DataBufferPtr
.
fn as_slice<T>(&self, ptr: DataBufferPtr<[T]>) -> &[T] where
T: Copy,
[src]
T: Copy,
Returns a object slice indicated by `DataBufferPtr.
fn as_str(&self, ptr: DataBufferPtr<str>) -> &str
[src]
Returns string slice indicated by DataBufferPtr
.
fn as_bytes<T: ?Sized>(&self, slice: DataBufferPtr<T>) -> &[u8] where
T: ,
[src]
T: ,
Trait Implementations
impl Debug for DataBuffer
[src]
impl Clone for DataBuffer
[src]
fn clone(&self) -> DataBuffer
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more