pub trait View<'a> {
type Type: Viewed;
// Required method
fn view(&'a self) -> Self::Type;
}Expand description
A trait defining a collection that can be accessed via an immutable (shared) view. This type of view can be cloned and copied.
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl<'a, I: IntBound> View<'a> for RangeInclusive<I>
impl<'a, I: IntBound> View<'a> for RangeInclusive<I>
Source§impl<'a, I: IntBound> View<'a> for RangeToInclusive<I>
impl<'a, I: IntBound> View<'a> for RangeToInclusive<I>
Source§impl<'a, S: ?Sized + 'a + View<'a>> View<'a> for &S
Blanket implementation of View for all immutable borrows.
impl<'a, S: ?Sized + 'a + View<'a>> View<'a> for &S
Blanket implementation of View for all immutable borrows.
Source§impl<'a, S: ?Sized + 'a + View<'a>> View<'a> for &mut S
Blanket implementation of View for all mutable borrows.
impl<'a, S: ?Sized + 'a + View<'a>> View<'a> for &mut S
Blanket implementation of View for all mutable borrows.