Enum AttrHandleMut

Source
pub enum AttrHandleMut<'a, O, I> {
    Owned(O),
    Borrowed(&'a mut [I]),
}
Expand description

Handle for traversing nested attribute structures mutably

Variants§

§

Owned(O)

Owned vector

§

Borrowed(&'a mut [I])

Vector reference

Implementations§

Source§

impl<'a, O, I> AttrHandleMut<'a, O, I>
where O: AsRef<[I]> + AsMut<[I]>,

Source

pub fn new(owned: O) -> Self

Create new AttrHandle

Source

pub fn new_borrowed(borrowed: &'a mut [I]) -> Self

Create new borrowed AttrHandleMut

Source

pub fn iter_mut(&mut self) -> IterMut<'_, I>

Pass back iterator over attributes

Source

pub fn get_mut_attrs(&mut self) -> &mut [I]

Get the underlying owned value as a mutable reference or return None.

Auto Trait Implementations§

§

impl<'a, O, I> Freeze for AttrHandleMut<'a, O, I>
where O: Freeze,

§

impl<'a, O, I> RefUnwindSafe for AttrHandleMut<'a, O, I>

§

impl<'a, O, I> Send for AttrHandleMut<'a, O, I>
where O: Send, I: Send,

§

impl<'a, O, I> Sync for AttrHandleMut<'a, O, I>
where O: Sync, I: Sync,

§

impl<'a, O, I> Unpin for AttrHandleMut<'a, O, I>
where O: Unpin,

§

impl<'a, O, I> !UnwindSafe for AttrHandleMut<'a, O, I>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.