pub enum EncodeResult<E> {
Ok(usize),
Err(E),
Overflow(usize),
}
Expand description
The result of an Encode::encode
call
Variants§
Ok(usize)
Item was successfully encoded and took usize
bytes of the provided
buffer.
Err(E)
There was an error encoding the item.
Overflow(usize)
The encoded item would overflow the buffer.
May contain the needed buffer size to successfully hold the encoded
item. The value 0
indicates that the needed buffer size is
unknown.
Trait Implementations§
Auto Trait Implementations§
impl<E> Freeze for EncodeResult<E>where
E: Freeze,
impl<E> RefUnwindSafe for EncodeResult<E>where
E: RefUnwindSafe,
impl<E> Send for EncodeResult<E>where
E: Send,
impl<E> Sync for EncodeResult<E>where
E: Sync,
impl<E> Unpin for EncodeResult<E>where
E: Unpin,
impl<E> UnwindSafe for EncodeResult<E>where
E: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more