pub enum InplaceMode {
Disallow,
Allow,
}Expand description
Whether a MutationView may reuse its value’s storage in place.
Allow is an upper bound: a value is reused in place only when it is also
uniquely owned. A view made from &mut Any starts as Allow, and a view
from MutationView::borrowed is always Disallow.
See also structural_mutate.
Variants§
Disallow
Use ordinary mutation, including for uniquely owned values.
Allow
Permit reuse when ownership and alias checks allow it.
Trait Implementations§
Source§impl Clone for InplaceMode
impl Clone for InplaceMode
Source§fn clone(&self) -> InplaceMode
fn clone(&self) -> InplaceMode
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for InplaceMode
impl Debug for InplaceMode
Source§impl Default for InplaceMode
impl Default for InplaceMode
Source§fn default() -> InplaceMode
fn default() -> InplaceMode
Returns the “default value” for a type. Read more
Source§impl PartialEq for InplaceMode
impl PartialEq for InplaceMode
impl Copy for InplaceMode
impl Eq for InplaceMode
impl StructuralPartialEq for InplaceMode
Auto Trait Implementations§
impl Freeze for InplaceMode
impl RefUnwindSafe for InplaceMode
impl Send for InplaceMode
impl Sync for InplaceMode
impl Unpin for InplaceMode
impl UnsafeUnpin for InplaceMode
impl UnwindSafe for InplaceMode
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