pub trait IndexOwned<Idx>
where Idx: ?Sized,
{ type Output; // Required method fn index(&self, index: Idx) -> Self::Output; }
Expand description

Index into an object.

Unlike std::ops::Index, allows implementors to return ownership of data, rather than just a reference.

Required Associated Types§

source

type Output

The result of the indexing operation.

Required Methods§

source

fn index(&self, index: Idx) -> Self::Output

Indexes the given object, returning owned data.

Implementors§

source§

impl IndexOwned<usize> for Concat

source§

impl IndexOwned<usize> for NamedSlice

source§

impl IndexOwned<usize> for Slice

source§

impl IndexOwned<usize> for SliceRange

source§

impl IndexOwned<Range<usize>> for NamedSlice

source§

impl IndexOwned<Range<usize>> for Slice

source§

impl IndexOwned<Range<usize>> for SliceRange

source§

impl IndexOwned<RangeFrom<usize>> for NamedSlice

source§

impl IndexOwned<RangeFrom<usize>> for Slice

source§

impl IndexOwned<RangeFrom<usize>> for SliceRange

source§

impl IndexOwned<RangeFull> for NamedSlice

source§

impl IndexOwned<RangeFull> for Slice

source§

impl IndexOwned<RangeFull> for SliceRange

source§

impl IndexOwned<RangeInclusive<usize>> for NamedSlice

source§

impl IndexOwned<RangeInclusive<usize>> for Slice

source§

impl IndexOwned<RangeInclusive<usize>> for SliceRange

source§

impl IndexOwned<RangeTo<usize>> for NamedSlice

source§

impl IndexOwned<RangeTo<usize>> for Slice

source§

impl IndexOwned<RangeTo<usize>> for SliceRange

source§

impl IndexOwned<RangeToInclusive<usize>> for NamedSlice

source§

impl IndexOwned<RangeToInclusive<usize>> for Slice

source§

impl IndexOwned<RangeToInclusive<usize>> for SliceRange