pub type RtAttrHandle<'a, T> = AttrHandle<'a, RtBuffer<T, Buffer>, Rtattr<T, Buffer>>;
Expand description
Represents a routing netlink attribute handle.
Aliased Type§
pub enum RtAttrHandle<'a, T> {
Owned(RtBuffer<T, Buffer>),
Borrowed(&'a [Rtattr<T, Buffer>]),
}
Variants§
Implementations§
Source§impl<'a, T> RtAttrHandle<'a, T>where
T: RtaType,
impl<'a, T> RtAttrHandle<'a, T>where
T: RtaType,
Sourcepub fn get_nested_attributes<S>(
&self,
subattr: T,
) -> Result<RtAttrHandle<'_, S>, DeError>where
S: RtaType,
pub fn get_nested_attributes<S>(
&self,
subattr: T,
) -> Result<RtAttrHandle<'_, S>, DeError>where
S: RtaType,
Get the payload of an attribute as a handle for parsing nested attributes.
Sourcepub fn get_attribute(&self, t: T) -> Option<&Rtattr<T, Buffer>>
pub fn get_attribute(&self, t: T) -> Option<&Rtattr<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 FromBytesWithInput
.