[−][src]Struct ordcode::buf::DeBytesWriter
Adapter type which implements double-ended write byte buffer over mutable byte slice
DeBytesWriter
implements WriteBytes
and TailWriteBytes
, and can be used with Serializer
.
Implementations
impl<'a> DeBytesWriter<'a>
[src]
pub fn new(buf: &'a mut [u8]) -> Self
[src]
Use provided byte slice as buffer
pub fn finalize(&mut self) -> Result<usize>
[src]
Finalize by collapsing extra space in internal buffer
Returns data length, which is smaller or equal to the original buffer size.
pub fn is_complete(&self) -> Result
[src]
Checks if buffer completely filled
Trait Implementations
impl<'a> TailWriteBytes for DeBytesWriter<'a>
[src]
impl<'a> WriteBytes for DeBytesWriter<'a>
[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for DeBytesWriter<'a>
[src]
impl<'a> Send for DeBytesWriter<'a>
[src]
impl<'a> Sync for DeBytesWriter<'a>
[src]
impl<'a> Unpin for DeBytesWriter<'a>
[src]
impl<'a> !UnwindSafe for DeBytesWriter<'a>
[src]
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>,