Enum capsules::net::thread::tlv::PrefixSubTlv
[−]
[src]
pub enum PrefixSubTlv<'a> { HasRoute(&'a [u8]), BorderRouter(&'a [u8]), SixLoWpanId { context_id_compress: bool, context_id: u8, context_length: u8, }, }
These TLVs are contained within the value of a Prefix TLV.
Variants
HasRoute(&'a [u8])
BorderRouter(&'a [u8])
SixLoWpanId
Fields of SixLoWpanId
context_id_compress: bool | |
context_id: u8 | |
context_length: u8 |
Methods
impl<'a> PrefixSubTlv<'a>
[src]
pub fn encode(&self, buf: &mut [u8], stable: bool) -> SResult
[src]
Serializes TLV data in buf
into the format specific to the
Prefix sub-TLV type.
fn encode_tl(&self, buf: &mut [u8], value_width: usize, stable: bool) -> SResult
[src]
pub fn decode(buf: &[u8]) -> SResult<(PrefixSubTlv, bool)>
[src]
Deserializes TLV data from buf
into the Prefix sub-TLV variant
specific to the TLV type.
Returns PrefixSubTlv and true if the data stable, false
otherwise.
SResult::Error
is returned if the type field does not match any
implemented TLV type.
Trait Implementations
impl<'a, 'b> From<&'a PrefixSubTlv<'b>> for PrefixSubTlvType
[src]
fn from(prefix_sub_tlv: &'a PrefixSubTlv<'b>) -> Self
[src]
Performs the conversion.