pub struct Dest<T> { /* private fields */ }Expand description
A destination that can store matched items.
This is a wrapper around RefCell<T> to allow interior mutability
while providing a convenient API for pattern matching destinations.
Implementations§
Source§impl<T> Dest<T>
impl<T> Dest<T>
pub fn new() -> Selfwhere
T: Default,
pub fn borrow_mut(&self) -> RefMut<'_, T>
pub fn as_refcell(&self) -> &RefCell<T>
pub fn into_inner(self) -> T
Trait Implementations§
Source§impl<Item, T> Destination<Item> for Dest<T>where
T: Destination<Item>,
impl<Item, T> Destination<Item> for Dest<T>where
T: Destination<Item>,
Auto Trait Implementations§
impl<T> !Freeze for Dest<T>
impl<T> !RefUnwindSafe for Dest<T>
impl<T> Send for Dest<T>where
T: Send,
impl<T> !Sync for Dest<T>
impl<T> Unpin for Dest<T>where
T: Unpin,
impl<T> UnwindSafe for Dest<T>where
T: UnwindSafe,
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