[−][src]Struct simple_tlv::Encoder 
SIMPLE-TLV encoder.
Implementations
impl<'a> Encoder<'a>[src]
pub fn new(bytes: &'a mut [u8]) -> Self[src]
Create a new encoder with the given byte slice as a backing buffer.
pub fn encode<T: Encodable>(&mut self, encodable: &T) -> Result<()>[src]
Encode a value which impls the Encodable trait.
pub fn error<T>(&mut self, kind: ErrorKind) -> Result<T>[src]
Return an error with the given ErrorKind, annotating it with
context about where the error occurred.
pub fn is_failed(&self) -> bool[src]
Did the decoding operation fail due to an error?
pub fn finish(self) -> Result<&'a [u8]>[src]
Finish encoding to the buffer, returning a slice containing the data written to the buffer.
pub fn encode_tagged_collection(
    &mut self, 
    tag: Tag, 
    encodables: &[&dyn Encodable]
) -> Result<()>[src]
&mut self,
tag: Tag,
encodables: &[&dyn Encodable]
) -> Result<()>
Encode a collection of values which impl the Encodable trait under a given tag.
pub fn encode_untagged_collection(
    &mut self, 
    encodables: &[&dyn Encodable]
) -> Result<()>[src]
&mut self,
encodables: &[&dyn Encodable]
) -> Result<()>
Encode a collection of values which impl the Encodable trait under a given tag.
Trait Implementations
Auto Trait Implementations
impl<'a> Send for Encoder<'a>[src]
impl<'a> Sync for Encoder<'a>[src]
impl<'a> Unpin for Encoder<'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>,