Trait RankedSliceable

Source
pub trait RankedSliceable: Ranked {
    // Required method
    fn sliced(&self, region: Region) -> Self;
}
Expand description

Extension of Ranked for types that can materialize a new owned view.

sliced constructs a new instance containing only the items in the given region. Unlike Ranked::get, which only provides borrowed access, sliced requires that the implementor can produce owned values for the specified sub-region.

Required Methods§

Source

fn sliced(&self, region: Region) -> Self

Construct a new Ranked containing the ranks in this view that are part of region. The caller guarantees that region.is_subset(self.region()).

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.

Implementors§