pub enum ResizePolicy<V> {
ZeroInit,
PreservePrefix,
PreserveSuffix,
PadWith(V),
}Expand description
Policy for handling slice length changes during atlas mutations.
Variants§
ZeroInit
Fill the entire new slice with V::default() when length changes.
PreservePrefix
Copy min(old, new) elements from the start; pad the tail if growing.
PreserveSuffix
Copy min(old, new) elements from the end; pad the head if growing.
PadWith(V)
Fill the slice with a provided value when (re)initializing.
Trait Implementations§
Source§impl<V: Clone> Clone for ResizePolicy<V>
impl<V: Clone> Clone for ResizePolicy<V>
Source§fn clone(&self) -> ResizePolicy<V>
fn clone(&self) -> ResizePolicy<V>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<V> Freeze for ResizePolicy<V>where
V: Freeze,
impl<V> RefUnwindSafe for ResizePolicy<V>where
V: RefUnwindSafe,
impl<V> Send for ResizePolicy<V>where
V: Send,
impl<V> Sync for ResizePolicy<V>where
V: Sync,
impl<V> Unpin for ResizePolicy<V>where
V: Unpin,
impl<V> UnsafeUnpin for ResizePolicy<V>where
V: UnsafeUnpin,
impl<V> UnwindSafe for ResizePolicy<V>where
V: UnwindSafe,
Blanket Implementations§
Source§impl<T> AccumulatePathExt for T
impl<T> AccumulatePathExt for T
fn accumulate_path<O, I>(path: I) -> Owhere
O: Orientation,
I: IntoIterator<Item = O>,
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