[−][src]Enum neli::attr::AttrHandle
Handle returned for traversing nested attribute structures
Variants
Owned vector
Borrowed(&'a [I])
Vector reference
Implementations
impl<'a, O, I> AttrHandle<'a, O, I> where
O: AsRef<[I]>,
[src]
O: AsRef<[I]>,
pub fn new(owned: O) -> Self
[src]
Create new AttrHandle
pub fn new_borrowed(borrowed: &'a [I]) -> Self
[src]
Create new borrowed AttrHandle
pub fn iter(&self) -> Iter<'_, I>ⓘ
[src]
Pass back iterator over attributes
pub fn get_attrs(&self) -> &[I]
[src]
Get the underlying owned value as a reference
impl<'a, T> AttrHandle<'a, GenlBuffer<T, Buffer>, Nlattr<T, Buffer>> where
T: NlAttrType,
[src]
T: NlAttrType,
pub fn get_nested_attributes<S>(
&mut self,
subattr: T
) -> Result<AttrHandle<'_, GenlBuffer<S, Buffer>, Nlattr<S, Buffer>>, NlError> where
S: NlAttrType,
[src]
&mut self,
subattr: T
) -> Result<AttrHandle<'_, GenlBuffer<S, Buffer>, Nlattr<S, Buffer>>, NlError> where
S: NlAttrType,
Get the payload of an attribute as a handle for parsing nested attributes
pub fn get_attribute(&self, t: T) -> Option<&Nlattr<T, Buffer>>
[src]
Get nested attributes from a parsed handle
pub fn get_attr_payload_as<R>(&self, attr: T) -> Result<R, NlError> where
R: Nl,
[src]
R: Nl,
Parse binary payload as a type that implements Nl
using
deserialize
.
impl<'a, T> AttrHandle<'a, RtBuffer<T, Buffer>, Rtattr<T, Buffer>> where
T: RtaType,
[src]
T: RtaType,
pub fn get_nested_attributes<S>(
&mut self,
subattr: T
) -> Result<AttrHandle<'_, RtBuffer<S, Buffer>, Rtattr<S, Buffer>>, NlError> where
S: RtaType,
[src]
&mut self,
subattr: T
) -> Result<AttrHandle<'_, RtBuffer<S, Buffer>, Rtattr<S, Buffer>>, NlError> where
S: RtaType,
Get the payload of an attribute as a handle for parsing nested attributes.
pub fn get_attribute(&self, t: T) -> Option<&Rtattr<T, Buffer>>
[src]
Get nested attributes from a parsed handle.
pub fn get_attr_payload_as<R>(&self, attr: T) -> Result<R, NlError> where
R: Nl,
[src]
R: Nl,
Parse binary payload as a type that implements Nl
using
deserialize
.
Auto Trait Implementations
impl<'a, O, I> RefUnwindSafe for AttrHandle<'a, O, I> where
I: RefUnwindSafe,
O: RefUnwindSafe,
[src]
I: RefUnwindSafe,
O: RefUnwindSafe,
impl<'a, O, I> Send for AttrHandle<'a, O, I> where
I: Sync,
O: Send,
[src]
I: Sync,
O: Send,
impl<'a, O, I> Sync for AttrHandle<'a, O, I> where
I: Sync,
O: Sync,
[src]
I: Sync,
O: Sync,
impl<'a, O, I> Unpin for AttrHandle<'a, O, I> where
O: Unpin,
[src]
O: Unpin,
impl<'a, O, I> UnwindSafe for AttrHandle<'a, O, I> where
I: RefUnwindSafe,
O: UnwindSafe,
[src]
I: RefUnwindSafe,
O: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,