pub trait View {
type Ref<'a>
where Self: 'a;
// Required method
fn view(&self) -> Self::Ref<'_>;
}Expand description
Represents a type that can be ‘viewed’ (derefed).
Mimics the impl for std::ops::Deref but makes use of GAT’s in order
to provide non & refs. Useful for things like tensor views.
Required Associated Types§
Required Methods§
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.