Struct columnar::common::Slice

source ·
pub struct Slice<S> { /* private fields */ }
Expand description

A struct representing a slice of a range of values.

The lower and upper bounds should be meaningfully set on construction.

Implementations§

source§

impl<S> Slice<S>

source

pub fn slice<R: RangeBounds<usize>>(self, range: R) -> Self

source

pub fn new(lower: u64, upper: u64, slice: S) -> Self

source

pub fn len(&self) -> usize

Trait Implementations§

source§

impl<S: Clone> Clone for Slice<S>

source§

fn clone(&self) -> Slice<S>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<S: Debug> Debug for Slice<S>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'a, S> Index for &'a Slice<S>
where &'a S: Index,

§

type Ref = <&'a S as Index>::Ref

The type returned by the get method. Read more
source§

fn get(&self, index: usize) -> Self::Ref

source§

fn last(&self) -> Option<Self::Ref>
where Self: Len,

source§

fn iter(&self) -> IterOwn<&Self>

source§

fn into_iter(self) -> IterOwn<Self>
where Self: Sized,

source§

impl<S: Index> Index for Slice<S>

§

type Ref = <S as Index>::Ref

The type returned by the get method. Read more
source§

fn get(&self, index: usize) -> Self::Ref

source§

fn last(&self) -> Option<Self::Ref>
where Self: Len,

source§

fn iter(&self) -> IterOwn<&Self>

source§

fn into_iter(self) -> IterOwn<Self>
where Self: Sized,

source§

impl<S: IndexMut> IndexMut for Slice<S>

§

type IndexMut<'a> = <S as IndexMut>::IndexMut<'a> where S: 'a

Type mutably referencing an indexed element.
source§

fn get_mut(&mut self, index: usize) -> Self::IndexMut<'_>

source§

fn last_mut(&mut self) -> Option<Self::IndexMut<'_>>
where Self: Len,

A reference to the last element, should one exist.
source§

impl<S> Len for Slice<S>

source§

fn len(&self) -> usize

The number of contained elements.
source§

fn is_empty(&self) -> bool

Whether this contains no elements.
source§

impl<S: Index> PartialEq<[<S as Index>::Ref]> for Slice<S>
where S::Ref: PartialEq,

source§

fn eq(&self, other: &[S::Ref]) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<S: Index> PartialEq<Vec<<S as Index>::Ref>> for Slice<S>
where S::Ref: PartialEq,

source§

fn eq(&self, other: &Vec<S::Ref>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<TC: Push<TC2::Ref> + Len, TC2: Index> Push<Slice<TC2>> for Vecs<TC>

source§

fn push(&mut self, item: Slice<TC2>)

Pushes an item onto self.
source§

fn extend(&mut self, iter: impl IntoIterator<Item = T>)

Pushes elements of an iterator onto self.
source§

impl<S: Copy> Copy for Slice<S>

Auto Trait Implementations§

§

impl<S> Freeze for Slice<S>
where S: Freeze,

§

impl<S> RefUnwindSafe for Slice<S>
where S: RefUnwindSafe,

§

impl<S> Send for Slice<S>
where S: Send,

§

impl<S> Sync for Slice<S>
where S: Sync,

§

impl<S> Unpin for Slice<S>
where S: Unpin,

§

impl<S> UnwindSafe for Slice<S>
where S: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

default unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> CloneToUninit for T
where T: Copy,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> CopyAs<T> for T

source§

fn copy_as(self) -> T

source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, S> IndexAs<S> for T
where T: Index, <T as Index>::Ref: CopyAs<S>,

source§

fn index_as(&self, index: usize) -> S

source§

fn last(&self) -> Option<T>
where Self: Len,

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.