Skip to main content

ReadOnlyClone

Trait ReadOnlyClone 

Source
pub trait ReadOnlyClone {
    type ReadOnly;

    // Required method
    fn read_only_clone(&self) -> Self::ReadOnly;
}
Expand description

Trait for creating read-only clones of composite types.

For stored vecs, delegates to StoredVec::read_only_clone. For containers (Option, BTreeMap, cohort groups), propagates to inner types. For Traversable-derived types with M: StorageMode, the derive macro generates an impl that maps Self<Rw>Self<Ro>.

Required Associated Types§

Required Methods§

Source

fn read_only_clone(&self) -> Self::ReadOnly

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<K: Clone + Ord, V: ReadOnlyClone> ReadOnlyClone for BTreeMap<K, V>

Source§

impl<T: ReadOnlyClone, const N: usize> ReadOnlyClone for [T; N]

Source§

impl<T: ReadOnlyClone> ReadOnlyClone for Option<T>

Implementors§

Source§

impl<I, T, S1I, S1T> ReadOnlyClone for LazyVec<I, T, S1I, S1T>
where I: VecIndex, T: VecValue, S1I: VecIndex, S1T: VecValue,

Source§

type ReadOnly = LazyVec<I, T, S1I, S1T>

Source§

impl<V: StoredVec> ReadOnlyClone for CachedVec<V>

Source§

impl<V: StoredVec> ReadOnlyClone for V