diff --git a/flexiber/trait.Container.html b/flexiber/trait.Container.html index 38ecf09..5f301d3 100644 --- a/flexiber/trait.Container.html +++ b/flexiber/trait.Container.html @@ -1,11 +1,11 @@ flexiber::Container - Rust

[][src]Trait flexiber::Container

pub trait Container {
+                Change settings

[][src]Trait flexiber::Container

pub trait Container {
     fn fields<F, T>(&self, f: F) -> Result<T>
    where
        F: FnOnce(&[&dyn Encodable]) -> Result<T>
; }

Multiple encodables in a container.

A container implementing Tagged has a blanked implementation of Encodable.

-

Required methods

fn fields<F, T>(&self, f: F) -> Result<T> where
    F: FnOnce(&[&dyn Encodable]) -> Result<T>, 
[src]

Call the provided function with a slice of Encodable trait objects +

Required methods

fn fields<F, T>(&self, f: F) -> Result<T> where
    F: FnOnce(&[&dyn Encodable]) -> Result<T>, 
[src]

Call the provided function with a slice of Encodable trait objects representing the fields of this message.

This method uses a callback because structs with fields which aren't directly Encodable may need to construct temporary values from diff --git a/flexiber/trait.Decodable.html b/flexiber/trait.Decodable.html index 51f7524..fec6585 100644 --- a/flexiber/trait.Decodable.html +++ b/flexiber/trait.Decodable.html @@ -10,4 +10,4 @@

One way to implement this trait is to implement TryFrom<TaggedSlice<'_>, Error = Error>.

Required methods

fn decode(decoder: &mut Decoder<'a>) -> Result<Self>[src]

Attempt to decode this message using the provided decoder.

Loading content...

Provided methods

fn from_bytes(bytes: &'a [u8]) -> Result<Self>[src]

Parse Self from the provided byte slice.

-
Loading content...

Implementors

impl Decodable<'_> for Length[src]

impl Decodable<'_> for SimpleTag[src]

impl Decodable<'_> for Tag[src]

impl Decodable<'_> for [u8; 0][src]

impl Decodable<'_> for [u8; 1][src]

impl Decodable<'_> for [u8; 2][src]

impl Decodable<'_> for [u8; 3][src]

impl Decodable<'_> for [u8; 4][src]

impl Decodable<'_> for [u8; 5][src]

impl Decodable<'_> for [u8; 6][src]

impl Decodable<'_> for [u8; 7][src]

impl Decodable<'_> for [u8; 8][src]

impl Decodable<'_> for [u8; 9][src]

impl Decodable<'_> for [u8; 10][src]

impl Decodable<'_> for [u8; 11][src]

impl Decodable<'_> for [u8; 12][src]

impl Decodable<'_> for [u8; 13][src]

impl Decodable<'_> for [u8; 14][src]

impl Decodable<'_> for [u8; 15][src]

impl Decodable<'_> for [u8; 16][src]

impl Decodable<'_> for [u8; 17][src]

impl Decodable<'_> for [u8; 18][src]

impl Decodable<'_> for [u8; 19][src]

impl Decodable<'_> for [u8; 20][src]

impl Decodable<'_> for [u8; 21][src]

impl Decodable<'_> for [u8; 22][src]

impl Decodable<'_> for [u8; 23][src]

impl Decodable<'_> for [u8; 24][src]

impl Decodable<'_> for [u8; 25][src]

impl Decodable<'_> for [u8; 26][src]

impl Decodable<'_> for [u8; 27][src]

impl Decodable<'_> for [u8; 28][src]

impl Decodable<'_> for [u8; 29][src]

impl Decodable<'_> for [u8; 30][src]

impl Decodable<'_> for [u8; 31][src]

impl Decodable<'_> for [u8; 32][src]

impl<'a, T> Decodable<'a> for TaggedSlice<'a, T> where
    T: Decodable<'a> + TagLike
[src]

impl<'a, X> Decodable<'a> for X where
    X: TryFrom<TaggedSlice<'a>, Error = Error>, 
[src]

Loading content...
\ No newline at end of file +Loading content...

Implementors

impl Decodable<'_> for Length[src]

impl Decodable<'_> for SimpleTag[src]

impl Decodable<'_> for Tag[src]

impl Decodable<'_> for [u8; 0][src]

impl Decodable<'_> for [u8; 1][src]

impl Decodable<'_> for [u8; 2][src]

impl Decodable<'_> for [u8; 3][src]

impl Decodable<'_> for [u8; 4][src]

impl Decodable<'_> for [u8; 5][src]

impl Decodable<'_> for [u8; 6][src]

impl Decodable<'_> for [u8; 7][src]

impl Decodable<'_> for [u8; 8][src]

impl Decodable<'_> for [u8; 9][src]

impl Decodable<'_> for [u8; 10][src]

impl Decodable<'_> for [u8; 11][src]

impl Decodable<'_> for [u8; 12][src]

impl Decodable<'_> for [u8; 13][src]

impl Decodable<'_> for [u8; 14][src]

impl Decodable<'_> for [u8; 15][src]

impl Decodable<'_> for [u8; 16][src]

impl Decodable<'_> for [u8; 17][src]

impl Decodable<'_> for [u8; 18][src]

impl Decodable<'_> for [u8; 19][src]

impl Decodable<'_> for [u8; 20][src]

impl Decodable<'_> for [u8; 21][src]

impl Decodable<'_> for [u8; 22][src]

impl Decodable<'_> for [u8; 23][src]

impl Decodable<'_> for [u8; 24][src]

impl Decodable<'_> for [u8; 25][src]

impl Decodable<'_> for [u8; 26][src]

impl Decodable<'_> for [u8; 27][src]

impl Decodable<'_> for [u8; 28][src]

impl Decodable<'_> for [u8; 29][src]

impl Decodable<'_> for [u8; 30][src]

impl Decodable<'_> for [u8; 31][src]

impl Decodable<'_> for [u8; 32][src]

impl<'a, T> Decodable<'a> for TaggedSlice<'a, T> where
    T: Decodable<'a> + TagLike
[src]

impl<'a, X> Decodable<'a> for X where
    X: TryFrom<TaggedSlice<'a>, Error = Error>, 
[src]

Loading content...
\ No newline at end of file diff --git a/flexiber/trait.Encodable.html b/flexiber/trait.Encodable.html index 95eb37e..2c911c0 100644 --- a/flexiber/trait.Encodable.html +++ b/flexiber/trait.Encodable.html @@ -1,6 +1,6 @@ flexiber::Encodable - Rust -

[][src]Trait flexiber::Tagged

pub trait Tagged {
     fn tag() -> Tag;
 }

Types with an associated BER-TLV Tag.

A tagged type implementing Container has a blanked implementation of Encodable.

-

Required methods

fn tag() -> Tag[src]

The tag

+

Required methods

fn tag() -> Tag[src]

The tag

Loading content...

Implementors

Loading content...
\ No newline at end of file diff --git a/search-index.js b/search-index.js index b07abf5..d6a0f0a 100644 --- a/search-index.js +++ b/search-index.js @@ -1,5 +1,5 @@ var searchIndex = JSON.parse('{\ -"flexiber":{"doc":"flexiberImplementation of the BER-TLV serialization …","i":[[24,"Decodable","flexiber","Derive the Decodable trait on a struct.",null,null],[24,"Encodable","","Derive the Encodable trait on a struct.",null,null],[3,"Decoder","","BER-TLV decoder.",null,null],[3,"Encoder","","BER-TLV encoder.",null,null],[3,"Error","","Error type.",null,null],[4,"ErrorKind","","Error type.",null,null],[13,"Failed","","Operation failed due to previous error",0,null],[13,"InvalidClass","","Class has more than 2 bytes",0,null],[12,"value","flexiber::ErrorKind","",1,null],[13,"InvalidTag","flexiber","Invalid tag",0,null],[12,"byte","flexiber::ErrorKind","Raw byte value of the tag",2,null],[13,"InvalidLength","flexiber","Length greater than u16::MAX",0,null],[13,"Length","","Incorrect length for a given field",0,null],[12,"tag","flexiber::ErrorKind","Tag type of the value being decoded",3,null],[13,"Overflow","flexiber","Integer overflow occurred (library bug!)",0,null],[13,"Overlength","","Message is longer than BER-TLV\'s limits support",0,null],[13,"TrailingData","","Undecoded trailing data at end of message",0,null],[12,"decoded","flexiber::ErrorKind","Length of the decoded data",4,null],[12,"remaining","","Total length of the remaining data left in the buffer",4,null],[13,"Truncated","flexiber","Unexpected end-of-message/nested field when decoding",0,null],[13,"Underlength","","Encoded message is shorter than the expected length (i.e. …",0,null],[12,"expected","flexiber::ErrorKind","Expected length",5,null],[12,"actual","","Actual length",5,null],[13,"UnexpectedTag","flexiber","Unexpected tag",0,null],[12,"expected","flexiber::ErrorKind","Tag the decoder was expecting (if there is a single such …",6,null],[12,"actual","","Actual tag encountered in the message",6,null],[13,"UnsupportedTagSize","flexiber","Tag does not fit in 3 bytes",0,null],[6,"Result","","Result type.",null,null],[3,"Length","","BER-TLV-encoded length.",null,null],[3,"SimpleTag","","These are tags like in SIMPLE-TLV.",null,null],[3,"Slice","","Slice of at most Length::max() bytes.",null,null],[4,"Class","","Class of BER tag.",null,null],[13,"Universal","","",7,null],[13,"Application","","",7,null],[13,"Context","","",7,null],[13,"Private","","",7,null],[3,"Tag","","The tag field consists of a single byte encoding a tag …",null,null],[12,"class","","",8,null],[12,"constructed","","",8,null],[12,"number","","",8,null],[8,"TagLike","","This is the common trait that types to be used as tags …",null,null],[10,"embedding","","To stick with one Error type, make sure the tag type can …",9,[[],["tag",3]]],[11,"assert_eq","","Assert that this [Tag] matches the provided expected tag.",9,[[],["result",6]]],[11,"with_value","","Ergonomic way to get a TaggedValue for a given tag and …",9,[[],["taggedvalue",3]]],[6,"TaggedSlice","","Raw BER-TLV data object TaggedValue>.",null,null],[3,"TaggedValue","","BER-TLV data object.",null,null],[8,"Container","","Multiple encodables in a container.",null,null],[10,"fields","","Call the provided function with a slice of [Encodable] …",10,[[],["result",6]]],[8,"Decodable","","Decoding trait.",null,null],[10,"decode","","Attempt to decode this message using the provided decoder.",11,[[["decoder",3]],["result",6]]],[11,"from_bytes","","Parse Self from the provided byte slice.",11,[[],["result",6]]],[8,"Encodable","","Encoding trait.",null,null],[10,"encoded_length","","Compute the length of this value in bytes when encoded as …",12,[[],[["length",3],["result",6]]]],[10,"encode","","Encode this value as BER-TLV using the provided [Encoder].",12,[[["encoder",3]],["result",6]]],[11,"encode_to_slice","","Encode this value to the provided byte slice, returning a …",12,[[],["result",6]]],[8,"Tagged","","Types with an associated BER-TLV [Tag].",null,null],[10,"tag","","The tag",13,[[],["tag",3]]],[11,"from","","",14,[[]]],[11,"borrow","","",14,[[]]],[11,"borrow_mut","","",14,[[]]],[11,"try_from","","",14,[[],["result",4]]],[11,"into","","",14,[[]]],[11,"try_into","","",14,[[],["result",4]]],[11,"type_id","","",14,[[],["typeid",3]]],[11,"from","","",15,[[]]],[11,"borrow","","",15,[[]]],[11,"borrow_mut","","",15,[[]]],[11,"try_from","","",15,[[],["result",4]]],[11,"into","","",15,[[]]],[11,"try_into","","",15,[[],["result",4]]],[11,"type_id","","",15,[[],["typeid",3]]],[11,"from","","",16,[[]]],[11,"borrow","","",16,[[]]],[11,"borrow_mut","","",16,[[]]],[11,"try_from","","",16,[[],["result",4]]],[11,"into","","",16,[[]]],[11,"try_into","","",16,[[],["result",4]]],[11,"type_id","","",16,[[],["typeid",3]]],[11,"from","","",0,[[]]],[11,"borrow","","",0,[[]]],[11,"borrow_mut","","",0,[[]]],[11,"try_from","","",0,[[],["result",4]]],[11,"into","","",0,[[]]],[11,"try_into","","",0,[[],["result",4]]],[11,"type_id","","",0,[[],["typeid",3]]],[11,"from","","",17,[[]]],[11,"borrow","","",17,[[]]],[11,"borrow_mut","","",17,[[]]],[11,"try_from","","",17,[[],["result",4]]],[11,"into","","",17,[[]]],[11,"try_into","","",17,[[],["result",4]]],[11,"type_id","","",17,[[],["typeid",3]]],[11,"from","","",18,[[]]],[11,"borrow","","",18,[[]]],[11,"borrow_mut","","",18,[[]]],[11,"try_from","","",18,[[],["result",4]]],[11,"into","","",18,[[]]],[11,"try_into","","",18,[[],["result",4]]],[11,"type_id","","",18,[[],["typeid",3]]],[11,"from","","",19,[[]]],[11,"borrow","","",19,[[]]],[11,"borrow_mut","","",19,[[]]],[11,"try_from","","",19,[[],["result",4]]],[11,"into","","",19,[[]]],[11,"try_into","","",19,[[],["result",4]]],[11,"type_id","","",19,[[],["typeid",3]]],[11,"from","","",7,[[]]],[11,"borrow","","",7,[[]]],[11,"borrow_mut","","",7,[[]]],[11,"try_from","","",7,[[],["result",4]]],[11,"into","","",7,[[]]],[11,"try_into","","",7,[[],["result",4]]],[11,"type_id","","",7,[[],["typeid",3]]],[11,"from","","",8,[[]]],[11,"borrow","","",8,[[]]],[11,"borrow_mut","","",8,[[]]],[11,"try_from","","",8,[[],["result",4]]],[11,"into","","",8,[[]]],[11,"try_into","","",8,[[],["result",4]]],[11,"type_id","","",8,[[],["typeid",3]]],[11,"from","","",20,[[]]],[11,"borrow","","",20,[[]]],[11,"borrow_mut","","",20,[[]]],[11,"try_from","","",20,[[],["result",4]]],[11,"into","","",20,[[]]],[11,"try_into","","",20,[[],["result",4]]],[11,"type_id","","",20,[[],["typeid",3]]],[11,"embedding","","",18,[[],["tag",3]]],[11,"embedding","","",8,[[],["tag",3]]],[11,"decode","","",17,[[["decoder",3]],[["length",3],["result",6]]]],[11,"decode","","",18,[[["decoder",3]],["result",6]]],[11,"decode","","",8,[[["decoder",3]],["result",6]]],[11,"decode","","",21,[[["decoder",3]],["result",6]]],[11,"encoded_length","","",17,[[],[["length",3],["result",6]]]],[11,"encode","","",17,[[["encoder",3]],["result",6]]],[11,"encoded_length","","",18,[[],[["length",3],["result",6]]]],[11,"encode","","",18,[[["encoder",3]],["result",6]]],[11,"encoded_length","","",8,[[],[["length",3],["result",6]]]],[11,"encode","","",8,[[["encoder",3]],["result",6]]],[11,"encoded_length","","",20,[[],[["length",3],["result",6]]]],[11,"encode","","",20,[[["encoder",3]],["result",6]]],[11,"encoded_length","","",21,[[],[["length",3],["result",6]]]],[11,"encode","","",21,[[["encoder",3]],["result",6]]],[11,"from","","",14,[[],["decoder",3]]],[11,"from","","",16,[[["errorkind",4]],["error",3]]],[11,"from","","",16,[[["infallible",4]],["error",3]]],[11,"from","","",17,[[],["length",3]]],[11,"from","","",17,[[],["length",3]]],[11,"fmt","","",14,[[["formatter",3]],["result",6]]],[11,"fmt","","",15,[[["formatter",3]],["result",6]]],[11,"fmt","","",16,[[["formatter",3]],["result",6]]],[11,"fmt","","",0,[[["formatter",3]],["result",6]]],[11,"fmt","","",17,[[["formatter",3]],["result",6]]],[11,"fmt","","",19,[[["formatter",3]],["result",6]]],[11,"fmt","","",7,[[["formatter",3]],["result",6]]],[11,"fmt","","",8,[[["formatter",3]],["result",6]]],[11,"fmt","","",20,[[["formatter",3]],["result",6]]],[11,"fmt","","",16,[[["formatter",3]],["result",6]]],[11,"fmt","","",0,[[["formatter",3]],["result",6]]],[11,"fmt","","",17,[[["formatter",3]],["result",6]]],[11,"fmt","","",8,[[["formatter",3]],["result",6]]],[11,"eq","","",16,[[["error",3]]]],[11,"ne","","",16,[[["error",3]]]],[11,"eq","","",0,[[["errorkind",4]]]],[11,"ne","","",0,[[["errorkind",4]]]],[11,"eq","","",17,[[["length",3]]]],[11,"ne","","",17,[[["length",3]]]],[11,"eq","","",18,[[["simpletag",3]]]],[11,"ne","","",18,[[["simpletag",3]]]],[11,"eq","","",19,[[["slice",3]]]],[11,"ne","","",19,[[["slice",3]]]],[11,"eq","","",7,[[["class",4]]]],[11,"eq","","",8,[[["tag",3]]]],[11,"ne","","",8,[[["tag",3]]]],[11,"eq","","",20,[[["taggedvalue",3]]]],[11,"ne","","",20,[[["taggedvalue",3]]]],[11,"cmp","","",17,[[["length",3]],["ordering",4]]],[11,"partial_cmp","","",17,[[["length",3]],[["option",4],["ordering",4]]]],[11,"lt","","",17,[[["length",3]]]],[11,"le","","",17,[[["length",3]]]],[11,"gt","","",17,[[["length",3]]]],[11,"ge","","",17,[[["length",3]]]],[11,"add","","",17,[[],["result",6]]],[11,"add","","",17,[[],["result",6]]],[11,"add","","",17,[[],["result",6]]],[11,"add","","",17,[[],["result",6]]],[11,"add","","",22,[[["length",3]]]],[11,"try_from","","",17,[[],[["length",3],["result",6]]]],[11,"try_from","","",17,[[],[["length",3],["result",6]]]],[11,"try_from","","",18,[[],["result",6]]],[11,"try_from","","",7,[[],["result",6]]],[11,"try_from","","",8,[[],["result",6]]],[11,"try_from","","",8,[[],["result",6]]],[11,"as_ref","","",19,[[]]],[11,"clone","","",16,[[],["error",3]]],[11,"clone","","",0,[[],["errorkind",4]]],[11,"clone","","",17,[[],["length",3]]],[11,"clone","","",18,[[],["simpletag",3]]],[11,"clone","","",19,[[],["slice",3]]],[11,"clone","","",7,[[],["class",4]]],[11,"clone","","",8,[[],["tag",3]]],[11,"clone","","",20,[[],["taggedvalue",3]]],[11,"default","","",17,[[],["length",3]]],[11,"new","","Create a new decoder for the given byte slice.",14,[[]]],[11,"decode","","Decode a value which impls the [Decodable] trait.",14,[[],[["decodable",8],["result",6]]]],[11,"decode_tagged_value","","Decode a TaggedValue with tag checked to be as expected, …",14,[[["decodable",8],["taglike",8]],[["decodable",8],["result",6]]]],[11,"decode_tagged_slice","","Decode a TaggedSlice with tag checked to be as expected, …",14,[[["decodable",8],["taglike",8]],["result",6]]],[11,"error","","Return an error with the given [ErrorKind], annotating it …",14,[[["errorkind",4]],["result",6]]],[11,"is_failed","","Did the decoding operation fail due to an error?",14,[[]]],[11,"finish","","Finish decoding, returning the given value if there is no …",14,[[],["result",6]]],[11,"is_finished","","Have we decoded all of the bytes in this [Decoder]?",14,[[]]],[11,"new","","Create a new encoder with the given byte slice as a …",15,[[]]],[11,"encode","","Encode a value which impls the [Encodable] trait.",15,[[],["result",6]]],[11,"error","","Return an error with the given [ErrorKind], annotating it …",15,[[["errorkind",4]],["result",6]]],[11,"is_failed","","Did the decoding operation fail due to an error?",15,[[]]],[11,"finish","","Finish encoding to the buffer, returning a slice …",15,[[],["result",6]]],[11,"encode_tagged_collection","","Encode a collection of values which impl the [Encodable] …",15,[[["tag",3]],["result",6]]],[11,"encode_untagged_collection","","Encode a collection of values which impl the [Encodable] …",15,[[],["result",6]]],[11,"new","","Create a new [Error]",16,[[["errorkind",4],["length",3]],["error",3]]],[11,"kind","","Get the [ErrorKind] which occurred.",16,[[],["errorkind",4]]],[11,"position","","Get the position inside of the message where the error …",16,[[],[["option",4],["length",3]]]],[11,"nested","","For errors occurring inside of a nested message, extend …",16,[[["length",3]]]],[11,"at","","Annotate an [ErrorKind] with context about where it …",0,[[["length",3]],["error",3]]],[11,"zero","","Return a length of 0.",17,[[]]],[11,"max","","Get the maximum length supported by BER-TLV: 65,535.",17,[[]]],[11,"to_usize","","Convert length to usize.",17,[[]]],[11,"new","","Create a new [Slice], ensuring that the provided slice …",19,[[],["result",6]]],[11,"as_bytes","","Borrow the inner byte slice",19,[[]]],[11,"length","","Get the [Length] of this [Slice]",19,[[],["length",3]]],[11,"is_empty","","Is this [Slice] empty?",19,[[]]],[11,"from","","",8,[[["class",4]]]],[11,"universal","","",8,[[]]],[11,"application","","",8,[[]]],[11,"context","","",8,[[]]],[11,"private","","",8,[[]]],[11,"constructed","","",8,[[]]],[11,"assert_eq","","Assert that this [Tag] matches the provided expected tag.",9,[[],["result",6]]],[11,"with_value","","Ergonomic way to get a TaggedValue for a given tag and …",9,[[],["taggedvalue",3]]],[11,"new","","",20,[[]]],[11,"tag","","",20,[[]]],[11,"from","","Create a new tagged slice, checking lengths.",20,[[],["result",6]]],[11,"as_bytes","","Borrow the inner byte slice.",20,[[]]],[11,"length","","Get the length of the inner byte slice.",20,[[],["length",3]]],[11,"is_empty","","Is the inner byte slice empty?",20,[[]]],[11,"decode_nested","","Decode nested values, creating a new [Decoder] for the …",20,[[],["result",6]]],[11,"from","","Create a new tagged slice, checking lengths.",21,[[],["result",6]]],[11,"as_bytes","","Borrow the inner byte slice.",21,[[]]],[11,"length","","Get the length of the inner byte slice.",21,[[],["length",3]]],[11,"is_empty","","Is the inner byte slice empty?",21,[[]]],[11,"decode_nested","","Decode nested values, creating a new [Decoder] for the …",21,[[],["result",6]]],[11,"from_bytes","","Parse Self from the provided byte slice.",11,[[],["result",6]]],[11,"encode_to_slice","","Encode this value to the provided byte slice, returning a …",12,[[],["result",6]]]],"p":[[4,"ErrorKind"],[13,"InvalidClass"],[13,"InvalidTag"],[13,"Length"],[13,"TrailingData"],[13,"Underlength"],[13,"UnexpectedTag"],[4,"Class"],[3,"Tag"],[8,"TagLike"],[8,"Container"],[8,"Decodable"],[8,"Encodable"],[8,"Tagged"],[3,"Decoder"],[3,"Encoder"],[3,"Error"],[3,"Length"],[3,"SimpleTag"],[3,"Slice"],[3,"TaggedValue"],[6,"TaggedSlice"],[6,"Result"]]},\ +"flexiber":{"doc":"flexiberImplementation of the BER-TLV serialization …","i":[[24,"Decodable","flexiber","Derive the Decodable trait on a struct.",null,null],[24,"Encodable","","Derive the Encodable trait on a struct.",null,null],[3,"Decoder","","BER-TLV decoder.",null,null],[3,"Encoder","","BER-TLV encoder.",null,null],[3,"Error","","Error type.",null,null],[4,"ErrorKind","","Error type.",null,null],[13,"Failed","","Operation failed due to previous error",0,null],[13,"InvalidClass","","Class has more than 2 bytes",0,null],[12,"value","flexiber::ErrorKind","",1,null],[13,"InvalidTag","flexiber","Invalid tag",0,null],[12,"byte","flexiber::ErrorKind","Raw byte value of the tag",2,null],[13,"InvalidLength","flexiber","Length greater than u16::MAX",0,null],[13,"Length","","Incorrect length for a given field",0,null],[12,"tag","flexiber::ErrorKind","Tag type of the value being decoded",3,null],[13,"Overflow","flexiber","Integer overflow occurred (library bug!)",0,null],[13,"Overlength","","Message is longer than BER-TLV\'s limits support",0,null],[13,"TrailingData","","Undecoded trailing data at end of message",0,null],[12,"decoded","flexiber::ErrorKind","Length of the decoded data",4,null],[12,"remaining","","Total length of the remaining data left in the buffer",4,null],[13,"Truncated","flexiber","Unexpected end-of-message/nested field when decoding",0,null],[13,"Underlength","","Encoded message is shorter than the expected length (i.e. …",0,null],[12,"expected","flexiber::ErrorKind","Expected length",5,null],[12,"actual","","Actual length",5,null],[13,"UnexpectedTag","flexiber","Unexpected tag",0,null],[12,"expected","flexiber::ErrorKind","Tag the decoder was expecting (if there is a single such …",6,null],[12,"actual","","Actual tag encountered in the message",6,null],[13,"UnsupportedTagSize","flexiber","Tag does not fit in 3 bytes",0,null],[6,"Result","","Result type.",null,null],[3,"Length","","BER-TLV-encoded length.",null,null],[3,"SimpleTag","","These are tags like in SIMPLE-TLV.",null,null],[3,"Slice","","Slice of at most Length::max() bytes.",null,null],[4,"Class","","Class of BER tag.",null,null],[13,"Universal","","",7,null],[13,"Application","","",7,null],[13,"Context","","",7,null],[13,"Private","","",7,null],[3,"Tag","","The tag field consists of a single byte encoding a tag …",null,null],[12,"class","","",8,null],[12,"constructed","","",8,null],[12,"number","","",8,null],[8,"TagLike","","This is the common trait that types to be used as tags …",null,null],[10,"embedding","","To stick with one Error type, make sure the tag type can …",9,[[],["tag",3]]],[11,"assert_eq","","Assert that this [Tag] matches the provided expected tag.",9,[[],["result",6]]],[11,"with_value","","Ergonomic way to get a TaggedValue for a given tag and …",9,[[],["taggedvalue",3]]],[6,"TaggedSlice","","Raw BER-TLV data object TaggedValue>.",null,null],[3,"TaggedValue","","BER-TLV data object.",null,null],[8,"Container","","Multiple encodables in a container.",null,null],[10,"fields","","Call the provided function with a slice of [Encodable] …",10,[[],["result",6]]],[8,"Decodable","","Decoding trait.",null,null],[10,"decode","","Attempt to decode this message using the provided decoder.",11,[[["decoder",3]],["result",6]]],[11,"from_bytes","","Parse Self from the provided byte slice.",11,[[],["result",6]]],[8,"Encodable","","Encoding trait.",null,null],[10,"encoded_length","","Compute the length of this value in bytes when encoded as …",12,[[],[["length",3],["result",6]]]],[10,"encode","","Encode this value as BER-TLV using the provided [Encoder].",12,[[["encoder",3]],["result",6]]],[11,"encode_to_slice","","Encode this value to the provided byte slice, returning a …",12,[[],["result",6]]],[8,"Tagged","","Types with an associated BER-TLV [Tag].",null,null],[10,"tag","","The tag",13,[[],["tag",3]]],[11,"from","","",14,[[]]],[11,"borrow","","",14,[[]]],[11,"borrow_mut","","",14,[[]]],[11,"try_from","","",14,[[],["result",4]]],[11,"into","","",14,[[]]],[11,"try_into","","",14,[[],["result",4]]],[11,"type_id","","",14,[[],["typeid",3]]],[11,"from","","",15,[[]]],[11,"borrow","","",15,[[]]],[11,"borrow_mut","","",15,[[]]],[11,"try_from","","",15,[[],["result",4]]],[11,"into","","",15,[[]]],[11,"try_into","","",15,[[],["result",4]]],[11,"type_id","","",15,[[],["typeid",3]]],[11,"from","","",16,[[]]],[11,"borrow","","",16,[[]]],[11,"borrow_mut","","",16,[[]]],[11,"try_from","","",16,[[],["result",4]]],[11,"into","","",16,[[]]],[11,"try_into","","",16,[[],["result",4]]],[11,"type_id","","",16,[[],["typeid",3]]],[11,"from","","",0,[[]]],[11,"borrow","","",0,[[]]],[11,"borrow_mut","","",0,[[]]],[11,"try_from","","",0,[[],["result",4]]],[11,"into","","",0,[[]]],[11,"try_into","","",0,[[],["result",4]]],[11,"type_id","","",0,[[],["typeid",3]]],[11,"from","","",17,[[]]],[11,"borrow","","",17,[[]]],[11,"borrow_mut","","",17,[[]]],[11,"try_from","","",17,[[],["result",4]]],[11,"into","","",17,[[]]],[11,"try_into","","",17,[[],["result",4]]],[11,"type_id","","",17,[[],["typeid",3]]],[11,"from","","",18,[[]]],[11,"borrow","","",18,[[]]],[11,"borrow_mut","","",18,[[]]],[11,"try_from","","",18,[[],["result",4]]],[11,"into","","",18,[[]]],[11,"try_into","","",18,[[],["result",4]]],[11,"type_id","","",18,[[],["typeid",3]]],[11,"from","","",19,[[]]],[11,"borrow","","",19,[[]]],[11,"borrow_mut","","",19,[[]]],[11,"try_from","","",19,[[],["result",4]]],[11,"into","","",19,[[]]],[11,"try_into","","",19,[[],["result",4]]],[11,"type_id","","",19,[[],["typeid",3]]],[11,"from","","",7,[[]]],[11,"borrow","","",7,[[]]],[11,"borrow_mut","","",7,[[]]],[11,"try_from","","",7,[[],["result",4]]],[11,"into","","",7,[[]]],[11,"try_into","","",7,[[],["result",4]]],[11,"type_id","","",7,[[],["typeid",3]]],[11,"from","","",8,[[]]],[11,"borrow","","",8,[[]]],[11,"borrow_mut","","",8,[[]]],[11,"try_from","","",8,[[],["result",4]]],[11,"into","","",8,[[]]],[11,"try_into","","",8,[[],["result",4]]],[11,"type_id","","",8,[[],["typeid",3]]],[11,"from","","",20,[[]]],[11,"borrow","","",20,[[]]],[11,"borrow_mut","","",20,[[]]],[11,"try_from","","",20,[[],["result",4]]],[11,"into","","",20,[[]]],[11,"try_into","","",20,[[],["result",4]]],[11,"type_id","","",20,[[],["typeid",3]]],[11,"embedding","","",18,[[],["tag",3]]],[11,"embedding","","",8,[[],["tag",3]]],[11,"decode","","",17,[[["decoder",3]],[["length",3],["result",6]]]],[11,"decode","","",18,[[["decoder",3]],["result",6]]],[11,"decode","","",8,[[["decoder",3]],["result",6]]],[11,"decode","","",21,[[["decoder",3]],["result",6]]],[11,"encoded_length","","",17,[[],[["length",3],["result",6]]]],[11,"encode","","",17,[[["encoder",3]],["result",6]]],[11,"encoded_length","","",18,[[],[["length",3],["result",6]]]],[11,"encode","","",18,[[["encoder",3]],["result",6]]],[11,"encoded_length","","",8,[[],[["length",3],["result",6]]]],[11,"encode","","",8,[[["encoder",3]],["result",6]]],[11,"encoded_length","","",20,[[],[["length",3],["result",6]]]],[11,"encode","","",20,[[["encoder",3]],["result",6]]],[11,"encoded_length","","",21,[[],[["length",3],["result",6]]]],[11,"encode","","",21,[[["encoder",3]],["result",6]]],[11,"from","","",14,[[],["decoder",3]]],[11,"from","","",16,[[["errorkind",4]],["error",3]]],[11,"from","","",16,[[["infallible",4]],["error",3]]],[11,"from","","",17,[[],["length",3]]],[11,"from","","",17,[[],["length",3]]],[11,"fmt","","",14,[[["formatter",3]],["result",6]]],[11,"fmt","","",15,[[["formatter",3]],["result",6]]],[11,"fmt","","",16,[[["formatter",3]],["result",6]]],[11,"fmt","","",0,[[["formatter",3]],["result",6]]],[11,"fmt","","",17,[[["formatter",3]],["result",6]]],[11,"fmt","","",19,[[["formatter",3]],["result",6]]],[11,"fmt","","",7,[[["formatter",3]],["result",6]]],[11,"fmt","","",8,[[["formatter",3]],["result",6]]],[11,"fmt","","",20,[[["formatter",3]],["result",6]]],[11,"fmt","","",16,[[["formatter",3]],["result",6]]],[11,"fmt","","",0,[[["formatter",3]],["result",6]]],[11,"fmt","","",17,[[["formatter",3]],["result",6]]],[11,"fmt","","",8,[[["formatter",3]],["result",6]]],[11,"eq","","",16,[[["error",3]]]],[11,"ne","","",16,[[["error",3]]]],[11,"eq","","",0,[[["errorkind",4]]]],[11,"ne","","",0,[[["errorkind",4]]]],[11,"eq","","",17,[[["length",3]]]],[11,"ne","","",17,[[["length",3]]]],[11,"eq","","",18,[[["simpletag",3]]]],[11,"ne","","",18,[[["simpletag",3]]]],[11,"eq","","",19,[[["slice",3]]]],[11,"ne","","",19,[[["slice",3]]]],[11,"eq","","",7,[[["class",4]]]],[11,"eq","","",8,[[["tag",3]]]],[11,"ne","","",8,[[["tag",3]]]],[11,"eq","","",20,[[["taggedvalue",3]]]],[11,"ne","","",20,[[["taggedvalue",3]]]],[11,"cmp","","",17,[[["length",3]],["ordering",4]]],[11,"partial_cmp","","",17,[[["length",3]],[["option",4],["ordering",4]]]],[11,"lt","","",17,[[["length",3]]]],[11,"le","","",17,[[["length",3]]]],[11,"gt","","",17,[[["length",3]]]],[11,"ge","","",17,[[["length",3]]]],[11,"add","","",17,[[],["result",6]]],[11,"add","","",17,[[],["result",6]]],[11,"add","","",17,[[],["result",6]]],[11,"add","","",17,[[],["result",6]]],[11,"add","","",22,[[["length",3]]]],[11,"try_from","","",17,[[],[["length",3],["result",6]]]],[11,"try_from","","",17,[[],[["length",3],["result",6]]]],[11,"try_from","","",18,[[],["result",6]]],[11,"try_from","","",7,[[],["result",6]]],[11,"try_from","","",8,[[],["result",6]]],[11,"try_from","","",8,[[],["result",6]]],[11,"as_ref","","",19,[[]]],[11,"clone","","",16,[[],["error",3]]],[11,"clone","","",0,[[],["errorkind",4]]],[11,"clone","","",17,[[],["length",3]]],[11,"clone","","",18,[[],["simpletag",3]]],[11,"clone","","",19,[[],["slice",3]]],[11,"clone","","",7,[[],["class",4]]],[11,"clone","","",8,[[],["tag",3]]],[11,"clone","","",20,[[],["taggedvalue",3]]],[11,"default","","",17,[[],["length",3]]],[11,"new","","Create a new decoder for the given byte slice.",14,[[]]],[11,"decode","","Decode a value which impls the [Decodable] trait.",14,[[],[["decodable",8],["result",6]]]],[11,"decode_tagged_value","","Decode a TaggedValue with tag checked to be as expected, …",14,[[["decodable",8],["taglike",8]],[["decodable",8],["result",6]]]],[11,"decode_tagged_slice","","Decode a TaggedSlice with tag checked to be as expected, …",14,[[["decodable",8],["taglike",8]],["result",6]]],[11,"error","","Return an error with the given [ErrorKind], annotating it …",14,[[["errorkind",4]],["result",6]]],[11,"is_failed","","Did the decoding operation fail due to an error?",14,[[]]],[11,"finish","","Finish decoding, returning the given value if there is no …",14,[[],["result",6]]],[11,"is_finished","","Have we decoded all of the bytes in this [Decoder]?",14,[[]]],[11,"new","","Create a new encoder with the given byte slice as a …",15,[[]]],[11,"encode","","Encode a value which impls the [Encodable] trait.",15,[[],["result",6]]],[11,"error","","Return an error with the given [ErrorKind], annotating it …",15,[[["errorkind",4]],["result",6]]],[11,"is_failed","","Did the decoding operation fail due to an error?",15,[[]]],[11,"finish","","Finish encoding to the buffer, returning a slice …",15,[[],["result",6]]],[11,"encode_tagged_collection","","Encode a collection of values which impl the [Encodable] …",15,[[["tag",3]],["result",6]]],[11,"encode_untagged_collection","","Encode a collection of values which impl the [Encodable] …",15,[[],["result",6]]],[11,"new","","Create a new [Error]",16,[[["length",3],["errorkind",4]],["error",3]]],[11,"kind","","Get the [ErrorKind] which occurred.",16,[[],["errorkind",4]]],[11,"position","","Get the position inside of the message where the error …",16,[[],[["length",3],["option",4]]]],[11,"nested","","For errors occurring inside of a nested message, extend …",16,[[["length",3]]]],[11,"at","","Annotate an [ErrorKind] with context about where it …",0,[[["length",3]],["error",3]]],[11,"zero","","Return a length of 0.",17,[[]]],[11,"max","","Get the maximum length supported by BER-TLV: 65,535.",17,[[]]],[11,"to_usize","","Convert length to usize.",17,[[]]],[11,"new","","Create a new [Slice], ensuring that the provided slice …",19,[[],["result",6]]],[11,"as_bytes","","Borrow the inner byte slice",19,[[]]],[11,"length","","Get the [Length] of this [Slice]",19,[[],["length",3]]],[11,"is_empty","","Is this [Slice] empty?",19,[[]]],[11,"from","","",8,[[["class",4]]]],[11,"universal","","",8,[[]]],[11,"application","","",8,[[]]],[11,"context","","",8,[[]]],[11,"private","","",8,[[]]],[11,"constructed","","",8,[[]]],[11,"assert_eq","","Assert that this [Tag] matches the provided expected tag.",9,[[],["result",6]]],[11,"with_value","","Ergonomic way to get a TaggedValue for a given tag and …",9,[[],["taggedvalue",3]]],[11,"new","","",20,[[]]],[11,"tag","","",20,[[]]],[11,"from","","Create a new tagged slice, checking lengths.",20,[[],["result",6]]],[11,"as_bytes","","Borrow the inner byte slice.",20,[[]]],[11,"length","","Get the length of the inner byte slice.",20,[[],["length",3]]],[11,"is_empty","","Is the inner byte slice empty?",20,[[]]],[11,"decode_nested","","Decode nested values, creating a new [Decoder] for the …",20,[[],["result",6]]],[11,"from","","Create a new tagged slice, checking lengths.",21,[[],["result",6]]],[11,"as_bytes","","Borrow the inner byte slice.",21,[[]]],[11,"length","","Get the length of the inner byte slice.",21,[[],["length",3]]],[11,"is_empty","","Is the inner byte slice empty?",21,[[]]],[11,"decode_nested","","Decode nested values, creating a new [Decoder] for the …",21,[[],["result",6]]],[11,"from_bytes","","Parse Self from the provided byte slice.",11,[[],["result",6]]],[11,"encode_to_slice","","Encode this value to the provided byte slice, returning a …",12,[[],["result",6]]]],"p":[[4,"ErrorKind"],[13,"InvalidClass"],[13,"InvalidTag"],[13,"Length"],[13,"TrailingData"],[13,"Underlength"],[13,"UnexpectedTag"],[4,"Class"],[3,"Tag"],[8,"TagLike"],[8,"Container"],[8,"Decodable"],[8,"Encodable"],[8,"Tagged"],[3,"Decoder"],[3,"Encoder"],[3,"Error"],[3,"Length"],[3,"SimpleTag"],[3,"Slice"],[3,"TaggedValue"],[6,"TaggedSlice"],[6,"Result"]]},\ "flexiber_derive":{"doc":"Custom derive support for the flexiber crate","i":[[24,"Decodable","flexiber_derive","Derive the Decodable trait on a struct.",null,null],[24,"Encodable","","Derive the Encodable trait on a struct.",null,null]],"p":[]},\ "proc_macro2":{"doc":"A wrapper around the procedural macro API of the …","i":[[0,"token_stream","proc_macro2","Public implementation details for the TokenStream type, …",null,null],[3,"IntoIter","proc_macro2::token_stream","An iterator over TokenStream\'s TokenTrees.",null,null],[3,"TokenStream","proc_macro2","An abstract stream of tokens, or more concretely a …",null,null],[3,"LexError","","Error returned from TokenStream::from_str.",null,null],[11,"new","","Returns an empty TokenStream containing no token trees.",0,[[],["tokenstream",3]]],[11,"is_empty","","Checks if this TokenStream is empty.",0,[[]]],[3,"Span","","A region of source code, along with macro expansion …",null,null],[11,"call_site","","The span of the invocation of the current procedural …",1,[[],["span",3]]],[11,"mixed_site","","The span located at the invocation of the procedural …",1,[[],["span",3]]],[11,"resolved_at","","Creates a new span with the same line/column information …",1,[[["span",3]],["span",3]]],[11,"located_at","","Creates a new span with the same name resolution behavior …",1,[[["span",3]],["span",3]]],[11,"unwrap","","Convert proc_macro2::Span to proc_macro::Span.",1,[[],["span",3]]],[11,"join","","Create a new span encompassing self and other.",1,[[["span",3]],[["span",3],["option",4]]]],[4,"TokenTree","","A single token or a delimited sequence of token trees …",null,null],[13,"Group","","A token stream surrounded by bracket delimiters.",2,null],[13,"Ident","","An identifier.",2,null],[13,"Punct","","A single punctuation character (+, ,, $, etc.).",2,null],[13,"Literal","","A literal character (\'a\'), string (\\\"hello\\\"), number (2.3…",2,null],[11,"span","","Returns the span of this tree, delegating to the span …",2,[[],["span",3]]],[11,"set_span","","Configures the span for only this token.",2,[[["span",3]]]],[3,"Group","","A delimited token stream.",null,null],[4,"Delimiter","","Describes how a sequence of token trees is delimited.",null,null],[13,"Parenthesis","","( ... )",3,null],[13,"Brace","","{ ... }",3,null],[13,"Bracket","","[ ... ]",3,null],[13,"None","","Ø ... Ø",3,null],[11,"new","","Creates a new Group with the given delimiter and token …",4,[[["tokenstream",3],["delimiter",4]],["group",3]]],[11,"delimiter","","Returns the delimiter of this Group",4,[[],["delimiter",4]]],[11,"stream","","Returns the TokenStream of tokens that are delimited in …",4,[[],["tokenstream",3]]],[11,"span","","Returns the span for the delimiters of this token stream, …",4,[[],["span",3]]],[11,"span_open","","Returns the span pointing to the opening delimiter of …",4,[[],["span",3]]],[11,"span_close","","Returns the span pointing to the closing delimiter of …",4,[[],["span",3]]],[11,"set_span","","Configures the span for this Group\'s delimiters, but not …",4,[[["span",3]]]],[3,"Punct","","An Punct is an single punctuation character like +, - or #…",null,null],[4,"Spacing","","Whether an Punct is followed immediately by another Punct …",null,null],[13,"Alone","","E.g. + is Alone in + =, +ident or +().",5,null],[13,"Joint","","E.g. + is Joint in += or \' is Joint in \'#.",5,null],[11,"new","","Creates a new Punct from the given character and spacing.",6,[[["spacing",4]],["punct",3]]],[11,"as_char","","Returns the value of this punctuation character as char.",6,[[]]],[11,"spacing","","Returns the spacing of this punctuation character, …",6,[[],["spacing",4]]],[11,"span","","Returns the span for this punctuation character.",6,[[],["span",3]]],[11,"set_span","","Configure the span for this punctuation character.",6,[[["span",3]]]],[3,"Ident","","A word of Rust code, which may be a keyword or legal …",null,null],[11,"new","","Creates a new Ident with the given string as well as the …",7,[[["span",3]],["ident",3]]],[11,"span","","Returns the span of this Ident.",7,[[],["span",3]]],[11,"set_span","","Configures the span of this Ident, possibly changing its …",7,[[["span",3]]]],[3,"Literal","","A literal string (\\\"hello\\\"), byte string (b\\\"hello\\\"), …",null,null],[11,"u8_suffixed","","Creates a new suffixed integer literal with the specified …",8,[[],["literal",3]]],[11,"u16_suffixed","","Creates a new suffixed integer literal with the specified …",8,[[],["literal",3]]],[11,"u32_suffixed","","Creates a new suffixed integer literal with the specified …",8,[[],["literal",3]]],[11,"u64_suffixed","","Creates a new suffixed integer literal with the specified …",8,[[],["literal",3]]],[11,"u128_suffixed","","Creates a new suffixed integer literal with the specified …",8,[[],["literal",3]]],[11,"usize_suffixed","","Creates a new suffixed integer literal with the specified …",8,[[],["literal",3]]],[11,"i8_suffixed","","Creates a new suffixed integer literal with the specified …",8,[[],["literal",3]]],[11,"i16_suffixed","","Creates a new suffixed integer literal with the specified …",8,[[],["literal",3]]],[11,"i32_suffixed","","Creates a new suffixed integer literal with the specified …",8,[[],["literal",3]]],[11,"i64_suffixed","","Creates a new suffixed integer literal with the specified …",8,[[],["literal",3]]],[11,"i128_suffixed","","Creates a new suffixed integer literal with the specified …",8,[[],["literal",3]]],[11,"isize_suffixed","","Creates a new suffixed integer literal with the specified …",8,[[],["literal",3]]],[11,"u8_unsuffixed","","Creates a new unsuffixed integer literal with the …",8,[[],["literal",3]]],[11,"u16_unsuffixed","","Creates a new unsuffixed integer literal with the …",8,[[],["literal",3]]],[11,"u32_unsuffixed","","Creates a new unsuffixed integer literal with the …",8,[[],["literal",3]]],[11,"u64_unsuffixed","","Creates a new unsuffixed integer literal with the …",8,[[],["literal",3]]],[11,"u128_unsuffixed","","Creates a new unsuffixed integer literal with the …",8,[[],["literal",3]]],[11,"usize_unsuffixed","","Creates a new unsuffixed integer literal with the …",8,[[],["literal",3]]],[11,"i8_unsuffixed","","Creates a new unsuffixed integer literal with the …",8,[[],["literal",3]]],[11,"i16_unsuffixed","","Creates a new unsuffixed integer literal with the …",8,[[],["literal",3]]],[11,"i32_unsuffixed","","Creates a new unsuffixed integer literal with the …",8,[[],["literal",3]]],[11,"i64_unsuffixed","","Creates a new unsuffixed integer literal with the …",8,[[],["literal",3]]],[11,"i128_unsuffixed","","Creates a new unsuffixed integer literal with the …",8,[[],["literal",3]]],[11,"isize_unsuffixed","","Creates a new unsuffixed integer literal with the …",8,[[],["literal",3]]],[11,"f64_unsuffixed","","Creates a new unsuffixed floating-point literal.",8,[[],["literal",3]]],[11,"f64_suffixed","","Creates a new suffixed floating-point literal.",8,[[],["literal",3]]],[11,"f32_unsuffixed","","Creates a new unsuffixed floating-point literal.",8,[[],["literal",3]]],[11,"f32_suffixed","","Creates a new suffixed floating-point literal.",8,[[],["literal",3]]],[11,"string","","String literal.",8,[[],["literal",3]]],[11,"character","","Character literal.",8,[[],["literal",3]]],[11,"byte_string","","Byte string literal.",8,[[],["literal",3]]],[11,"span","","Returns the span encompassing this literal.",8,[[],["span",3]]],[11,"set_span","","Configures the span associated for this literal.",8,[[["span",3]]]],[11,"subspan","","Returns a Span that is a subset of self.span() containing …",8,[[["rangebounds",8]],[["span",3],["option",4]]]],[11,"from","proc_macro2::token_stream","",9,[[]]],[11,"into","","",9,[[]]],[11,"into_iter","","",9,[[]]],[11,"to_owned","","",9,[[]]],[11,"clone_into","","",9,[[]]],[11,"borrow","","",9,[[]]],[11,"borrow_mut","","",9,[[]]],[11,"try_from","","",9,[[],["result",4]]],[11,"try_into","","",9,[[],["result",4]]],[11,"type_id","","",9,[[],["typeid",3]]],[11,"from","proc_macro2","",0,[[]]],[11,"into","","",0,[[]]],[11,"to_owned","","",0,[[]]],[11,"clone_into","","",0,[[]]],[11,"to_string","","",0,[[],["string",3]]],[11,"borrow","","",0,[[]]],[11,"borrow_mut","","",0,[[]]],[11,"try_from","","",0,[[],["result",4]]],[11,"try_into","","",0,[[],["result",4]]],[11,"type_id","","",0,[[],["typeid",3]]],[11,"from","","",10,[[]]],[11,"into","","",10,[[]]],[11,"to_string","","",10,[[],["string",3]]],[11,"borrow","","",10,[[]]],[11,"borrow_mut","","",10,[[]]],[11,"try_from","","",10,[[],["result",4]]],[11,"try_into","","",10,[[],["result",4]]],[11,"type_id","","",10,[[],["typeid",3]]],[11,"from","","",1,[[]]],[11,"into","","",1,[[]]],[11,"to_owned","","",1,[[]]],[11,"clone_into","","",1,[[]]],[11,"borrow","","",1,[[]]],[11,"borrow_mut","","",1,[[]]],[11,"try_from","","",1,[[],["result",4]]],[11,"try_into","","",1,[[],["result",4]]],[11,"type_id","","",1,[[],["typeid",3]]],[11,"from","","",2,[[]]],[11,"into","","",2,[[]]],[11,"to_owned","","",2,[[]]],[11,"clone_into","","",2,[[]]],[11,"to_string","","",2,[[],["string",3]]],[11,"borrow","","",2,[[]]],[11,"borrow_mut","","",2,[[]]],[11,"try_from","","",2,[[],["result",4]]],[11,"try_into","","",2,[[],["result",4]]],[11,"type_id","","",2,[[],["typeid",3]]],[11,"from","","",4,[[]]],[11,"into","","",4,[[]]],[11,"to_owned","","",4,[[]]],[11,"clone_into","","",4,[[]]],[11,"to_string","","",4,[[],["string",3]]],[11,"borrow","","",4,[[]]],[11,"borrow_mut","","",4,[[]]],[11,"try_from","","",4,[[],["result",4]]],[11,"try_into","","",4,[[],["result",4]]],[11,"type_id","","",4,[[],["typeid",3]]],[11,"from","","",3,[[]]],[11,"into","","",3,[[]]],[11,"to_owned","","",3,[[]]],[11,"clone_into","","",3,[[]]],[11,"borrow","","",3,[[]]],[11,"borrow_mut","","",3,[[]]],[11,"try_from","","",3,[[],["result",4]]],[11,"try_into","","",3,[[],["result",4]]],[11,"type_id","","",3,[[],["typeid",3]]],[11,"from","","",6,[[]]],[11,"into","","",6,[[]]],[11,"to_owned","","",6,[[]]],[11,"clone_into","","",6,[[]]],[11,"to_string","","",6,[[],["string",3]]],[11,"borrow","","",6,[[]]],[11,"borrow_mut","","",6,[[]]],[11,"try_from","","",6,[[],["result",4]]],[11,"try_into","","",6,[[],["result",4]]],[11,"type_id","","",6,[[],["typeid",3]]],[11,"from","","",5,[[]]],[11,"into","","",5,[[]]],[11,"to_owned","","",5,[[]]],[11,"clone_into","","",5,[[]]],[11,"borrow","","",5,[[]]],[11,"borrow_mut","","",5,[[]]],[11,"try_from","","",5,[[],["result",4]]],[11,"try_into","","",5,[[],["result",4]]],[11,"type_id","","",5,[[],["typeid",3]]],[11,"from","","",7,[[]]],[11,"into","","",7,[[]]],[11,"to_owned","","",7,[[]]],[11,"clone_into","","",7,[[]]],[11,"to_string","","",7,[[],["string",3]]],[11,"borrow","","",7,[[]]],[11,"borrow_mut","","",7,[[]]],[11,"try_from","","",7,[[],["result",4]]],[11,"try_into","","",7,[[],["result",4]]],[11,"type_id","","",7,[[],["typeid",3]]],[11,"from","","",8,[[]]],[11,"into","","",8,[[]]],[11,"to_owned","","",8,[[]]],[11,"clone_into","","",8,[[]]],[11,"to_string","","",8,[[],["string",3]]],[11,"borrow","","",8,[[]]],[11,"borrow_mut","","",8,[[]]],[11,"try_from","","",8,[[],["result",4]]],[11,"try_into","","",8,[[],["result",4]]],[11,"type_id","","",8,[[],["typeid",3]]],[11,"from","","",1,[[["span",3]],["span",3]]],[11,"from","","",0,[[["tokenstream",3]],["tokenstream",3]]],[11,"from","","",0,[[["tokentree",4]]]],[11,"from","","",2,[[["group",3]],["tokentree",4]]],[11,"from","","",2,[[["ident",3]],["tokentree",4]]],[11,"from","","",2,[[["punct",3]],["tokentree",4]]],[11,"from","","",2,[[["literal",3]],["tokentree",4]]],[11,"extend","","",0,[[["intoiterator",8]]]],[11,"extend","","",0,[[["intoiterator",8]]]],[11,"into_iter","","",0,[[],["intoiter",3]]],[11,"next","proc_macro2::token_stream","",9,[[],[["tokentree",4],["option",4]]]],[11,"clone","proc_macro2","",0,[[],["tokenstream",3]]],[11,"clone","","",1,[[],["span",3]]],[11,"clone","","",2,[[],["tokentree",4]]],[11,"clone","","",4,[[],["group",3]]],[11,"clone","","",3,[[],["delimiter",4]]],[11,"clone","","",6,[[],["punct",3]]],[11,"clone","","",5,[[],["spacing",4]]],[11,"clone","","",7,[[],["ident",3]]],[11,"clone","","",8,[[],["literal",3]]],[11,"clone","proc_macro2::token_stream","",9,[[],["intoiter",3]]],[11,"default","proc_macro2","",0,[[]]],[11,"cmp","","",7,[[["ident",3]],["ordering",4]]],[11,"eq","","",3,[[["delimiter",4]]]],[11,"eq","","",5,[[["spacing",4]]]],[11,"eq","","",7,[[["ident",3]]]],[11,"eq","","",7,[[]]],[11,"partial_cmp","","",7,[[["ident",3]],[["option",4],["ordering",4]]]],[11,"fmt","","",0,[[["formatter",3]],["result",6]]],[11,"fmt","","",10,[[["formatter",3]],["result",6]]],[11,"fmt","","",1,[[["formatter",3]],["result",6]]],[11,"fmt","","",2,[[["formatter",3]],["result",6]]],[11,"fmt","","",3,[[["formatter",3]],["result",6]]],[11,"fmt","","",4,[[["formatter",3]],["result",6]]],[11,"fmt","","",5,[[["formatter",3]],["result",6]]],[11,"fmt","","",6,[[["formatter",3]],["result",6]]],[11,"fmt","","",7,[[["formatter",3]],["result",6]]],[11,"fmt","","",8,[[["formatter",3]],["result",6]]],[11,"fmt","proc_macro2::token_stream","",9,[[["formatter",3]],["result",6]]],[11,"fmt","proc_macro2","",0,[[["formatter",3]],["result",6]]],[11,"fmt","","",10,[[["formatter",3]],["result",6]]],[11,"fmt","","",2,[[["formatter",3]],["result",6]]],[11,"fmt","","",4,[[["formatter",3]],["result",6]]],[11,"fmt","","",6,[[["formatter",3]],["result",6]]],[11,"fmt","","",7,[[["formatter",3]],["result",6]]],[11,"fmt","","",8,[[["formatter",3]],["result",6]]],[11,"hash","","",7,[[]]],[11,"from_str","","",0,[[],[["tokenstream",3],["lexerror",3],["result",4]]]],[11,"from_iter","","",0,[[["intoiterator",8]]]],[11,"from_iter","","",0,[[["intoiterator",8]]]]],"p":[[3,"TokenStream"],[3,"Span"],[4,"TokenTree"],[4,"Delimiter"],[3,"Group"],[4,"Spacing"],[3,"Punct"],[3,"Ident"],[3,"Literal"],[3,"IntoIter"],[3,"LexError"]]},\ "quote":{"doc":"github crates-io docs-rs","i":[[8,"TokenStreamExt","quote","TokenStream extension trait with methods for appending …",null,null],[10,"append","","For use by ToTokens implementations.",0,[[]]],[10,"append_all","","For use by ToTokens implementations.",0,[[]]],[10,"append_separated","","For use by ToTokens implementations.",0,[[]]],[10,"append_terminated","","For use by ToTokens implementations.",0,[[]]],[8,"IdentFragment","","Specialized formatting trait used by format_ident!.",null,null],[10,"fmt","","Format this value as an identifier fragment.",1,[[["formatter",3]],["result",6]]],[11,"span","","Span associated with this IdentFragment.",1,[[],[["option",4],["span",3]]]],[8,"ToTokens","","Types that can be interpolated inside a quote! invocation.",null,null],[10,"to_tokens","","Write self to the given TokenStream.",2,[[["tokenstream",3]]]],[11,"to_token_stream","","Convert self directly into a TokenStream object.",2,[[],["tokenstream",3]]],[11,"into_token_stream","","Convert self directly into a TokenStream object.",2,[[],["tokenstream",3]]],[14,"format_ident","","Formatting macro for constructing Idents.",null,null],[14,"quote","","The whole point.",null,null],[14,"quote_spanned","","Same as quote!, but applies a given span to all tokens …",null,null],[11,"span","","Span associated with this IdentFragment.",1,[[],[["option",4],["span",3]]]],[11,"to_token_stream","","Convert self directly into a TokenStream object.",2,[[],["tokenstream",3]]],[11,"into_token_stream","","Convert self directly into a TokenStream object.",2,[[],["tokenstream",3]]]],"p":[[8,"TokenStreamExt"],[8,"IdentFragment"],[8,"ToTokens"]]},\ diff --git a/src/flexiber/traits.rs.html b/src/flexiber/traits.rs.html index 1d11665..34640b1 100644 --- a/src/flexiber/traits.rs.html +++ b/src/flexiber/traits.rs.html @@ -578,6 +578,26 @@ 575 576 577 +578 +579 +580 +581 +582 +583 +584 +585 +586 +587 +588 +589 +590 +591 +592 +593 +594 +595 +596 +597
 // pub use der::{Decodable, Encodable};
 //! Trait definitions
@@ -718,6 +738,9 @@
     }
 }
 
+#[cfg(feature = "heapless")]
+impl<X> EncodableHeapless for X where X: Encodable {}
+
 /// Types that can be tagged.
 pub(crate) trait Taggable<T: TagLike>: Sized {
     fn tagged(&self, tag: T) -> TaggedValue<&Self, T> {
@@ -822,7 +845,7 @@
 //     }
 // }
 
-impl<'a> Encodable for &'a [u8] {
+impl Encodable for &[u8] {
     fn encoded_length(&self) -> Result<Length> {
         self.len().try_into()
     }
@@ -833,6 +856,23 @@
     }
 }
 
+impl Encodable for Option<&[u8]> {
+    fn encoded_length(&self) -> Result<Length> {
+        match self {
+            Some(slice) => slice.encoded_length(),
+            None => Ok(Length::zero()),
+        }
+    }
+
+    /// Encode this value as BER-TLV using the provided [`Encoder`].
+    fn encode(&self, encoder: &mut Encoder<'_>) -> Result<()> {
+        match self {
+            Some(slice) => encoder.bytes(slice),
+            None => Ok(())
+        }
+    }
+}
+
 macro_rules! impl_array {
     ($($N:literal),*) => {
         $(
diff --git a/src/flexiber_derive/encodable.rs.html b/src/flexiber_derive/encodable.rs.html
index 3f5b504..98facf7 100644
--- a/src/flexiber_derive/encodable.rs.html
+++ b/src/flexiber_derive/encodable.rs.html
@@ -150,6 +150,7 @@
 147
 148
 149
+150
 
 use proc_macro2::TokenStream;
 use quote::{quote, ToTokens};
@@ -279,6 +280,7 @@
                         F: FnOnce(&[&dyn flexiber::Encodable]) -> flexiber::Result<T>,
                     {
                         use core::convert::TryFrom;
+                        use flexiber::TagLike;
                         field_encoder(&[#encode_fields])
                     }
                 }