Trait Offset

Source
pub trait Offset {
    type Output: VecLike;
    type OutputMut: VecLike;

    // Required methods
    fn offset(self, i: usize) -> OffsetVec<Self::Output>;
    fn offset_mut(&mut self, i: usize) -> OffsetVec<&mut Self::OutputMut>;
}

Required Associated Types§

Required Methods§

Source

fn offset(self, i: usize) -> OffsetVec<Self::Output>

Source

fn offset_mut(&mut self, i: usize) -> OffsetVec<&mut Self::OutputMut>

Implementations on Foreign Types§

Source§

impl Offset for String

Source§

type Output = String

Source§

type OutputMut = String

Source§

fn offset(self, i: usize) -> OffsetVec<Self::Output>

Source§

fn offset_mut(&mut self, i: usize) -> OffsetVec<&mut Self::Output>

Source§

impl<'a, V: Offset + VecLike> Offset for &'a mut V

Source§

type Output = &'a mut <V as Offset>::OutputMut

Source§

type OutputMut = <V as Offset>::OutputMut

Source§

fn offset(self, i: usize) -> OffsetVec<Self::Output>

Source§

fn offset_mut(&mut self, i: usize) -> OffsetVec<&mut Self::OutputMut>

Source§

impl<A: Array> Offset for SmallVec<A>

Available on crate feature smallvec only.
Source§

type Output = SmallVec<A>

Source§

type OutputMut = SmallVec<A>

Source§

fn offset(self, i: usize) -> OffsetVec<Self::Output>

Source§

fn offset_mut(&mut self, i: usize) -> OffsetVec<&mut Self::Output>

Source§

impl<A: Array<Item = u8>> Offset for SmallString<A>

Available on crate feature smallstr only.
Source§

type Output = SmallString<A>

Source§

type OutputMut = SmallString<A>

Source§

fn offset(self, i: usize) -> OffsetVec<Self::Output>

Source§

fn offset_mut(&mut self, i: usize) -> OffsetVec<&mut Self::Output>

Source§

impl<T> Offset for Vec<T>

Source§

type Output = Vec<T>

Source§

type OutputMut = Vec<T>

Source§

fn offset(self, i: usize) -> OffsetVec<Self::Output>

Source§

fn offset_mut(&mut self, i: usize) -> OffsetVec<&mut Self::Output>

Source§

impl<T> Offset for ArcVec<T>

Available on crate feature rc-vec only.
Source§

type Output = ArcVec<T>

Source§

type OutputMut = ArcVec<T>

Source§

fn offset(self, i: usize) -> OffsetVec<Self::Output>

Source§

fn offset_mut(&mut self, i: usize) -> OffsetVec<&mut Self::Output>

Source§

impl<T> Offset for RcVec<T>

Available on crate feature rc-vec only.
Source§

type Output = RcVec<T>

Source§

type OutputMut = RcVec<T>

Source§

fn offset(self, i: usize) -> OffsetVec<Self::Output>

Source§

fn offset_mut(&mut self, i: usize) -> OffsetVec<&mut Self::Output>

Source§

impl<V: Offset<Output = V> + VecLike + Clone> Offset for Rc<V>

Source§

type Output = Rc<V>

Source§

type OutputMut = <V as Offset>::OutputMut

Source§

fn offset(self, i: usize) -> OffsetVec<Self::Output>

Source§

fn offset_mut(&mut self, i: usize) -> OffsetVec<&mut Self::OutputMut>

Source§

impl<V: Offset<Output = V> + VecLike + Clone> Offset for Arc<V>

Source§

type Output = Arc<V>

Source§

type OutputMut = <V as Offset>::OutputMut

Source§

fn offset(self, i: usize) -> OffsetVec<Self::Output>

Source§

fn offset_mut(&mut self, i: usize) -> OffsetVec<&mut Self::OutputMut>

Source§

impl<V: Offset<Output = V> + VecLike> Offset for Box<V>

Source§

type Output = Box<V>

Source§

type OutputMut = <V as Offset>::OutputMut

Source§

fn offset(self, i: usize) -> OffsetVec<Self::Output>

Source§

fn offset_mut(&mut self, i: usize) -> OffsetVec<&mut Self::OutputMut>

Source§

impl<V: Offset<Output = V> + VecLike> Offset for UniqArc<V>

Available on crate feature unique-rc only.
Source§

type Output = UniqArc<V>

Source§

type OutputMut = <V as Offset>::OutputMut

Source§

fn offset(self, i: usize) -> OffsetVec<Self::Output>

Source§

fn offset_mut(&mut self, i: usize) -> OffsetVec<&mut Self::OutputMut>

Source§

impl<V: Offset<Output = V> + VecLike> Offset for UniqRc<V>

Available on crate feature unique-rc only.
Source§

type Output = UniqRc<V>

Source§

type OutputMut = <V as Offset>::OutputMut

Source§

fn offset(self, i: usize) -> OffsetVec<Self::Output>

Source§

fn offset_mut(&mut self, i: usize) -> OffsetVec<&mut Self::OutputMut>

Implementors§