pub trait ClonableView: View {
// Required method
fn clone_unchecked(&mut self) -> Result<Self, ViewError>;
}Expand description
A view that can be shared (unsafely) by cloning it.
Note: Calling flush on any of the shared views will break the other views. Therefore,
cloning views is only safe if flush only ever happens after all the copies but one
have been dropped.
Required Methods§
Sourcefn clone_unchecked(&mut self) -> Result<Self, ViewError>
fn clone_unchecked(&mut self) -> Result<Self, ViewError>
Creates a clone of this view, sharing the underlying storage context but prone to data races which can corrupt the view state.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.