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