pub type GenlAttrHandle<'a, T> = AttrHandle<'a, GenlBuffer<T, Buffer>, Nlattr<T, Buffer>>;
Expand description
Type representing a generic netlink attribute handle.
Aliased Type§
pub enum GenlAttrHandle<'a, T> {
Owned(GenlBuffer<T, Buffer>),
Borrowed(&'a [Nlattr<T, Buffer>]),
}
Variants§
Implementations§
Source§impl<'a, T> GenlAttrHandle<'a, T>where
T: NlAttrType,
impl<'a, T> GenlAttrHandle<'a, T>where
T: NlAttrType,
Sourcepub fn get_nested_attributes<S>(
&self,
subattr: T,
) -> Result<GenlAttrHandle<'_, S>, DeError>where
S: NlAttrType,
pub fn get_nested_attributes<S>(
&self,
subattr: T,
) -> Result<GenlAttrHandle<'_, S>, DeError>where
S: NlAttrType,
Get the payload of an attribute as a handle for parsing nested attributes
Sourcepub fn get_attribute(&self, t: T) -> Option<&Nlattr<T, Buffer>>
pub fn get_attribute(&self, t: T) -> Option<&Nlattr<T, Buffer>>
Get nested attributes from a parsed handle
Sourcepub fn get_attr_payload_as<R>(&self, attr: T) -> Result<R, DeError>where
R: FromBytes,
pub fn get_attr_payload_as<R>(&self, attr: T) -> Result<R, DeError>where
R: FromBytes,
Parse binary payload as a type that implements FromBytes
.
Sourcepub fn get_attr_payload_as_with_len<R>(&self, attr: T) -> Result<R, DeError>where
R: FromBytesWithInput<Input = usize>,
pub fn get_attr_payload_as_with_len<R>(&self, attr: T) -> Result<R, DeError>where
R: FromBytesWithInput<Input = usize>,
Parse binary payload as a type that implements
FromBytesWithInput
Sourcepub fn get_attr_payload_as_with_len_borrowed<R>(
&'a self,
attr: T,
) -> Result<R, DeError>where
R: FromBytesWithInputBorrowed<'a, Input = usize>,
pub fn get_attr_payload_as_with_len_borrowed<R>(
&'a self,
attr: T,
) -> Result<R, DeError>where
R: FromBytesWithInputBorrowed<'a, Input = usize>,
Parse binary payload as a type that implements
FromBytesWithInputBorrowed