Struct allsorts_no_std::binary::write::WriteBuffer [−][src]
An in-memory buffer that implements WriteContext
.
Implementations
impl WriteBuffer
[src]
pub fn new() -> Self
[src]
Create a new, empty WriteBuffer
pub fn bytes(&self) -> &[u8]
[src]
Retrieve a slice of the data held by this buffer
pub fn len(&self) -> usize
[src]
Returns the current size of the data held by this buffer
pub fn into_inner(self) -> Vec<u8>
[src]
Consume self
and return the inner buffer
Trait Implementations
impl WriteContext for WriteBuffer
[src]
fn write_bytes(&mut self, data: &[u8]) -> Result<(), WriteError>
[src]
fn write_zeros(&mut self, count: usize) -> Result<(), WriteError>
[src]
fn bytes_written(&self) -> usize
[src]
fn write_placeholder<T, HostType>(
&mut self,
placeholder: Placeholder<T, HostType>,
val: HostType
) -> Result<T::Output, WriteError> where
T: WriteBinary<HostType>,
[src]
&mut self,
placeholder: Placeholder<T, HostType>,
val: HostType
) -> Result<T::Output, WriteError> where
T: WriteBinary<HostType>,
fn write_array<'a, T>(
&mut self,
array: &ReadArray<'a, T>
) -> Result<(), WriteError> where
Self: Sized,
T: ReadUnchecked<'a> + WriteBinary<<T as ReadUnchecked<'a>>::HostType>,
[src]
&mut self,
array: &ReadArray<'a, T>
) -> Result<(), WriteError> where
Self: Sized,
T: ReadUnchecked<'a> + WriteBinary<<T as ReadUnchecked<'a>>::HostType>,
fn write_vec<'a, T>(
&mut self,
vec: Vec<<T as ReadUnchecked<'a>>::HostType>
) -> Result<(), WriteError> where
Self: Sized,
T: ReadUnchecked<'a> + WriteBinary<<T as ReadUnchecked<'a>>::HostType>,
[src]
&mut self,
vec: Vec<<T as ReadUnchecked<'a>>::HostType>
) -> Result<(), WriteError> where
Self: Sized,
T: ReadUnchecked<'a> + WriteBinary<<T as ReadUnchecked<'a>>::HostType>,
fn placeholder<'a, T, HostType>(
&mut self
) -> Result<Placeholder<T, HostType>, WriteError> where
T: WriteBinary<HostType> + ReadUnchecked<'a>,
[src]
&mut self
) -> Result<Placeholder<T, HostType>, WriteError> where
T: WriteBinary<HostType> + ReadUnchecked<'a>,
fn reserve<'a, T, HostType>(
&mut self,
count: usize
) -> Result<Placeholder<T, &'a HostType>, WriteError> where
T: WriteBinary<&'a HostType>,
[src]
&mut self,
count: usize
) -> Result<Placeholder<T, &'a HostType>, WriteError> where
T: WriteBinary<&'a HostType>,
fn placeholder_array<'a, T, HostType>(
&mut self,
count: usize
) -> Result<Vec<Placeholder<T, HostType>>, WriteError> where
T: WriteBinary<HostType> + ReadUnchecked<'a>,
[src]
&mut self,
count: usize
) -> Result<Vec<Placeholder<T, HostType>>, WriteError> where
T: WriteBinary<HostType> + ReadUnchecked<'a>,
Auto Trait Implementations
impl RefUnwindSafe for WriteBuffer
impl Send for WriteBuffer
impl Sync for WriteBuffer
impl Unpin for WriteBuffer
impl UnwindSafe for WriteBuffer
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,