[−][src]Trait simple_tlv::Encodable
Encoding trait.
Encode into encoder, which essentially is a mutable slice of bytes.
Additionally, the encoded length needs to be known without actually encoding.
Required methods
fn encoded_length(&self) -> Result<Length>
[src]
Compute the length of this value in bytes when encoded as SIMPLE-TLV
fn encode(&self, encoder: &mut Encoder<'_>) -> Result<()>
[src]
Encode this value as SIMPLE-TLV using the provided Encoder
.
Provided methods
fn encode_to_slice<'a>(&self, buf: &'a mut [u8]) -> Result<&'a [u8]>
[src]
Encode this value to the provided byte slice, returning a sub-slice containing the encoded message.
Implementors
impl Encodable for Length
[src]
fn encoded_length(&self) -> Result<Length>
[src]
fn encode(&self, encoder: &mut Encoder<'_>) -> Result<()>
[src]
impl Encodable for Tag
[src]
fn encoded_length(&self) -> Result<Length>
[src]
fn encode(&self, encoder: &mut Encoder<'_>) -> Result<()>
[src]
impl Encodable for [u8; 0]
[src]
fn encoded_length(&self) -> Result<Length>
[src]
fn encode(&self, encoder: &mut Encoder<'_>) -> Result<()>
[src]
Encode this value as SIMPLE-TLV using the provided Encoder
.
impl Encodable for [u8; 1]
[src]
fn encoded_length(&self) -> Result<Length>
[src]
fn encode(&self, encoder: &mut Encoder<'_>) -> Result<()>
[src]
Encode this value as SIMPLE-TLV using the provided Encoder
.
impl Encodable for [u8; 2]
[src]
fn encoded_length(&self) -> Result<Length>
[src]
fn encode(&self, encoder: &mut Encoder<'_>) -> Result<()>
[src]
Encode this value as SIMPLE-TLV using the provided Encoder
.
impl Encodable for [u8; 3]
[src]
fn encoded_length(&self) -> Result<Length>
[src]
fn encode(&self, encoder: &mut Encoder<'_>) -> Result<()>
[src]
Encode this value as SIMPLE-TLV using the provided Encoder
.
impl Encodable for [u8; 4]
[src]
fn encoded_length(&self) -> Result<Length>
[src]
fn encode(&self, encoder: &mut Encoder<'_>) -> Result<()>
[src]
Encode this value as SIMPLE-TLV using the provided Encoder
.
impl Encodable for [u8; 5]
[src]
fn encoded_length(&self) -> Result<Length>
[src]
fn encode(&self, encoder: &mut Encoder<'_>) -> Result<()>
[src]
Encode this value as SIMPLE-TLV using the provided Encoder
.
impl Encodable for [u8; 6]
[src]
fn encoded_length(&self) -> Result<Length>
[src]
fn encode(&self, encoder: &mut Encoder<'_>) -> Result<()>
[src]
Encode this value as SIMPLE-TLV using the provided Encoder
.
impl Encodable for [u8; 7]
[src]
fn encoded_length(&self) -> Result<Length>
[src]
fn encode(&self, encoder: &mut Encoder<'_>) -> Result<()>
[src]
Encode this value as SIMPLE-TLV using the provided Encoder
.
impl Encodable for [u8; 8]
[src]
fn encoded_length(&self) -> Result<Length>
[src]
fn encode(&self, encoder: &mut Encoder<'_>) -> Result<()>
[src]
Encode this value as SIMPLE-TLV using the provided Encoder
.
impl Encodable for [u8; 9]
[src]
fn encoded_length(&self) -> Result<Length>
[src]
fn encode(&self, encoder: &mut Encoder<'_>) -> Result<()>
[src]
Encode this value as SIMPLE-TLV using the provided Encoder
.
impl Encodable for [u8; 10]
[src]
fn encoded_length(&self) -> Result<Length>
[src]
fn encode(&self, encoder: &mut Encoder<'_>) -> Result<()>
[src]
Encode this value as SIMPLE-TLV using the provided Encoder
.
impl Encodable for [u8; 11]
[src]
fn encoded_length(&self) -> Result<Length>
[src]
fn encode(&self, encoder: &mut Encoder<'_>) -> Result<()>
[src]
Encode this value as SIMPLE-TLV using the provided Encoder
.
impl Encodable for [u8; 12]
[src]
fn encoded_length(&self) -> Result<Length>
[src]
fn encode(&self, encoder: &mut Encoder<'_>) -> Result<()>
[src]
Encode this value as SIMPLE-TLV using the provided Encoder
.
impl Encodable for [u8; 13]
[src]
fn encoded_length(&self) -> Result<Length>
[src]
fn encode(&self, encoder: &mut Encoder<'_>) -> Result<()>
[src]
Encode this value as SIMPLE-TLV using the provided Encoder
.
impl Encodable for [u8; 14]
[src]
fn encoded_length(&self) -> Result<Length>
[src]
fn encode(&self, encoder: &mut Encoder<'_>) -> Result<()>
[src]
Encode this value as SIMPLE-TLV using the provided Encoder
.
impl Encodable for [u8; 15]
[src]
fn encoded_length(&self) -> Result<Length>
[src]
fn encode(&self, encoder: &mut Encoder<'_>) -> Result<()>
[src]
Encode this value as SIMPLE-TLV using the provided Encoder
.
impl Encodable for [u8; 16]
[src]
fn encoded_length(&self) -> Result<Length>
[src]
fn encode(&self, encoder: &mut Encoder<'_>) -> Result<()>
[src]
Encode this value as SIMPLE-TLV using the provided Encoder
.
impl Encodable for [u8; 17]
[src]
fn encoded_length(&self) -> Result<Length>
[src]
fn encode(&self, encoder: &mut Encoder<'_>) -> Result<()>
[src]
Encode this value as SIMPLE-TLV using the provided Encoder
.
impl Encodable for [u8; 18]
[src]
fn encoded_length(&self) -> Result<Length>
[src]
fn encode(&self, encoder: &mut Encoder<'_>) -> Result<()>
[src]
Encode this value as SIMPLE-TLV using the provided Encoder
.
impl Encodable for [u8; 19]
[src]
fn encoded_length(&self) -> Result<Length>
[src]
fn encode(&self, encoder: &mut Encoder<'_>) -> Result<()>
[src]
Encode this value as SIMPLE-TLV using the provided Encoder
.
impl Encodable for [u8; 20]
[src]
fn encoded_length(&self) -> Result<Length>
[src]
fn encode(&self, encoder: &mut Encoder<'_>) -> Result<()>
[src]
Encode this value as SIMPLE-TLV using the provided Encoder
.
impl Encodable for [u8; 21]
[src]
fn encoded_length(&self) -> Result<Length>
[src]
fn encode(&self, encoder: &mut Encoder<'_>) -> Result<()>
[src]
Encode this value as SIMPLE-TLV using the provided Encoder
.
impl Encodable for [u8; 22]
[src]
fn encoded_length(&self) -> Result<Length>
[src]
fn encode(&self, encoder: &mut Encoder<'_>) -> Result<()>
[src]
Encode this value as SIMPLE-TLV using the provided Encoder
.
impl Encodable for [u8; 23]
[src]
fn encoded_length(&self) -> Result<Length>
[src]
fn encode(&self, encoder: &mut Encoder<'_>) -> Result<()>
[src]
Encode this value as SIMPLE-TLV using the provided Encoder
.
impl Encodable for [u8; 24]
[src]
fn encoded_length(&self) -> Result<Length>
[src]
fn encode(&self, encoder: &mut Encoder<'_>) -> Result<()>
[src]
Encode this value as SIMPLE-TLV using the provided Encoder
.
impl Encodable for [u8; 25]
[src]
fn encoded_length(&self) -> Result<Length>
[src]
fn encode(&self, encoder: &mut Encoder<'_>) -> Result<()>
[src]
Encode this value as SIMPLE-TLV using the provided Encoder
.
impl Encodable for [u8; 26]
[src]
fn encoded_length(&self) -> Result<Length>
[src]
fn encode(&self, encoder: &mut Encoder<'_>) -> Result<()>
[src]
Encode this value as SIMPLE-TLV using the provided Encoder
.
impl Encodable for [u8; 27]
[src]
fn encoded_length(&self) -> Result<Length>
[src]
fn encode(&self, encoder: &mut Encoder<'_>) -> Result<()>
[src]
Encode this value as SIMPLE-TLV using the provided Encoder
.
impl Encodable for [u8; 28]
[src]
fn encoded_length(&self) -> Result<Length>
[src]
fn encode(&self, encoder: &mut Encoder<'_>) -> Result<()>
[src]
Encode this value as SIMPLE-TLV using the provided Encoder
.
impl Encodable for [u8; 29]
[src]
fn encoded_length(&self) -> Result<Length>
[src]
fn encode(&self, encoder: &mut Encoder<'_>) -> Result<()>
[src]
Encode this value as SIMPLE-TLV using the provided Encoder
.
impl Encodable for [u8; 30]
[src]
fn encoded_length(&self) -> Result<Length>
[src]
fn encode(&self, encoder: &mut Encoder<'_>) -> Result<()>
[src]
Encode this value as SIMPLE-TLV using the provided Encoder
.
impl Encodable for [u8; 31]
[src]
fn encoded_length(&self) -> Result<Length>
[src]
fn encode(&self, encoder: &mut Encoder<'_>) -> Result<()>
[src]
Encode this value as SIMPLE-TLV using the provided Encoder
.
impl Encodable for [u8; 32]
[src]
fn encoded_length(&self) -> Result<Length>
[src]
fn encode(&self, encoder: &mut Encoder<'_>) -> Result<()>
[src]
Encode this value as SIMPLE-TLV using the provided Encoder
.
impl<'a> Encodable for &'a [u8]
[src]
fn encoded_length(&self) -> Result<Length>
[src]
fn encode(&self, encoder: &mut Encoder<'_>) -> Result<()>
[src]
Encode this value as SIMPLE-TLV using the provided Encoder
.
impl<'a> Encodable for TaggedSlice<'a>
[src]
fn encoded_length(&self) -> Result<Length>
[src]
fn encode(&self, encoder: &mut Encoder<'_>) -> Result<()>
[src]
impl<'a, E> Encodable for TaggedValue<&'a E> where
E: Encodable,
[src]
E: Encodable,
fn encoded_length(&self) -> Result<Length>
[src]
fn encode(&self, encoder: &mut Encoder<'_>) -> Result<()>
[src]
impl<TaggedContainer> Encodable for TaggedContainer where
TaggedContainer: Tagged + Container,
[src]
TaggedContainer: Tagged + Container,