Enum capsules::net::thread::tlv::ServiceSubTlv
[−]
[src]
pub enum ServiceSubTlv { Server { s_server_16: u16, s_server_data: [u8; 128], }, }
These TLVs are contained within the value of a Service TLV.
Variants
Server
Fields of Server
s_server_16: u16 | |
s_server_data: [u8; 128] |
Methods
impl<'a> ServiceSubTlv
[src]
pub fn encode(&self, buf: &mut [u8], stable: bool) -> SResult
[src]
Serializes TLV data in buf
into the format specific to the
Service sub-TLV type.
fn encode_tl(&self, buf: &mut [u8], value_width: usize, stable: bool) -> SResult
[src]
pub fn decode(buf: &[u8]) -> SResult<(ServiceSubTlv, bool)>
[src]
Deserializes TLV data from buf
into the Service sub-TLV variant
specific to the TLV type.
Returns ServiceSubTlv 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> From<&'a ServiceSubTlv> for ServiceSubTlvType
[src]
fn from(service_sub_tlv: &'a ServiceSubTlv) -> Self
[src]
Performs the conversion.