Enum capsules_extra::net::thread::tlv::ServiceSubTlv
source · pub enum ServiceSubTlv {
Server {
s_server_16: u16,
s_server_data: [u8; 128],
},
}
Expand description
These TLVs are contained within the value of a Service TLV.
Variants§
Implementations§
source§impl ServiceSubTlv
impl ServiceSubTlv
sourcepub fn encode(&self, buf: &mut [u8], stable: bool) -> SResult
pub fn encode(&self, buf: &mut [u8], stable: bool) -> SResult
Serializes TLV data in buf
into the format specific to the
Service sub-TLV type.
sourcepub fn decode(buf: &[u8]) -> SResult<(ServiceSubTlv, bool)>
pub fn decode(buf: &[u8]) -> SResult<(ServiceSubTlv, bool)>
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§
source§impl From<&ServiceSubTlv> for ServiceSubTlvType
impl From<&ServiceSubTlv> for ServiceSubTlvType
source§fn from(service_sub_tlv: &ServiceSubTlv) -> Self
fn from(service_sub_tlv: &ServiceSubTlv) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ServiceSubTlv
impl RefUnwindSafe for ServiceSubTlv
impl Send for ServiceSubTlv
impl Sync for ServiceSubTlv
impl Unpin for ServiceSubTlv
impl UnwindSafe for ServiceSubTlv
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more