pub enum AttrHandle<'a, O, I> {
Owned(O),
Borrowed(&'a [I]),
}
Expand description
Handle returned for traversing nested attribute structures
Variants§
Implementations§
Source§impl<'a, O, I> AttrHandle<'a, O, I>
impl<'a, O, I> AttrHandle<'a, O, I>
Sourcepub fn new(owned: O) -> Self
pub fn new(owned: O) -> Self
Create new AttrHandle
Sourcepub fn new_borrowed(borrowed: &'a [I]) -> Self
pub fn new_borrowed(borrowed: &'a [I]) -> Self
Create new borrowed AttrHandle
Source§impl<T> AttrHandle<'_, GenlBuffer<T, Buffer>, Nlattr<T, Buffer>>where
T: NlAttrType,
impl<T> AttrHandle<'_, GenlBuffer<T, Buffer>, Nlattr<T, Buffer>>where
T: NlAttrType,
Sourcepub fn get_nested_attributes<S>(
&mut self,
subattr: T,
) -> Result<AttrHandle<'_, GenlBuffer<S, Buffer>, Nlattr<S, Buffer>>, DeError>where
S: NlAttrType,
pub fn get_nested_attributes<S>(
&mut self,
subattr: T,
) -> Result<AttrHandle<'_, GenlBuffer<S, Buffer>, Nlattr<S, Buffer>>, 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<'b, R>(&'b self, attr: T) -> Result<R, DeError>where
R: FromBytes<'b>,
pub fn get_attr_payload_as<'b, R>(&'b self, attr: T) -> Result<R, DeError>where
R: FromBytes<'b>,
Parse binary payload as a type that implements FromBytes
.
Sourcepub fn get_attr_payload_as_with_len<'b, R>(
&'b self,
attr: T,
) -> Result<R, DeError>where
R: FromBytesWithInput<'b, Input = usize>,
pub fn get_attr_payload_as_with_len<'b, R>(
&'b self,
attr: T,
) -> Result<R, DeError>where
R: FromBytesWithInput<'b, Input = usize>,
Parse binary payload as a type that implements
FromBytesWithInput
Source§impl<T> AttrHandle<'_, RtBuffer<T, Buffer>, Rtattr<T, Buffer>>where
T: RtaType,
impl<T> AttrHandle<'_, RtBuffer<T, Buffer>, Rtattr<T, Buffer>>where
T: RtaType,
Sourcepub fn get_nested_attributes<S>(
&mut self,
subattr: T,
) -> Result<AttrHandle<'_, RtBuffer<S, Buffer>, Rtattr<S, Buffer>>, DeError>where
S: RtaType,
pub fn get_nested_attributes<S>(
&mut self,
subattr: T,
) -> Result<AttrHandle<'_, RtBuffer<S, Buffer>, Rtattr<S, Buffer>>, 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<'b, R>(&'b self, attr: T) -> Result<R, DeError>where
R: FromBytes<'b>,
pub fn get_attr_payload_as<'b, R>(&'b self, attr: T) -> Result<R, DeError>where
R: FromBytes<'b>,
Parse binary payload as a type that implements FromBytes
.
Sourcepub fn get_attr_payload_as_with_len<'b, R>(
&'b self,
attr: T,
) -> Result<R, DeError>where
R: FromBytesWithInput<'b, Input = usize>,
pub fn get_attr_payload_as_with_len<'b, R>(
&'b self,
attr: T,
) -> Result<R, DeError>where
R: FromBytesWithInput<'b, Input = usize>,
Parse binary payload as a type that implements FromBytesWithInput
.
Auto Trait Implementations§
impl<'a, O, I> Freeze for AttrHandle<'a, O, I>where
O: Freeze,
impl<'a, O, I> RefUnwindSafe for AttrHandle<'a, O, I>where
O: RefUnwindSafe,
I: RefUnwindSafe,
impl<'a, O, I> Send for AttrHandle<'a, O, I>
impl<'a, O, I> Sync for AttrHandle<'a, O, I>
impl<'a, O, I> Unpin for AttrHandle<'a, O, I>where
O: Unpin,
impl<'a, O, I> UnwindSafe for AttrHandle<'a, O, I>where
O: UnwindSafe,
I: RefUnwindSafe,
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