pub struct Borrow;
Expand description
Destructuring by borrow, e.g. let (a, b) = c
where c
is a reference.
Borrow destructuring leaves the original value intact, only borrowing from
the destructured value. Borrow destructuring may use rest patterns (..
)
because the original value is not moved and so it is safe to restructure
only some of the fields of the destructured value.
Auto Trait Implementations§
impl Freeze for Borrow
impl RefUnwindSafe for Borrow
impl Send for Borrow
impl Sync for Borrow
impl Unpin for Borrow
impl UnwindSafe for Borrow
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