Struct StepRange

Source
pub struct StepRange<R, S> {
    pub range: R,
    pub step: S,
}
Expand description

Range constructed from a unit spaced range with the given step size.

Fields§

§range: R

Unit spaced range.

§step: S

Step size.

Trait Implementations§

Source§

impl<R: Clone, S: Clone> Clone for StepRange<R, S>

Source§

fn clone(&self) -> StepRange<R, 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<R: Debug, S: Debug> Debug for StepRange<R, S>

Source§

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

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

impl<R: Default, S: Default> Default for StepRange<R, S>

Source§

fn default() -> StepRange<R, S>

Returns the “default value” for a type. Read more
Source§

impl<R: Hash, S: Hash> Hash for StepRange<R, S>

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<R: PartialEq, S: PartialEq> PartialEq for StepRange<R, S>

Source§

fn eq(&self, other: &StepRange<R, S>) -> 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<R: Copy, S: Copy> Copy for StepRange<R, S>

Source§

impl<R: RangeBounds<usize>> DimIndex for StepRange<R, isize>

Source§

impl<R: Eq, S: Eq> Eq for StepRange<R, S>

Source§

impl<R, S> StructuralPartialEq for StepRange<R, S>

Auto Trait Implementations§

§

impl<R, S> Freeze for StepRange<R, S>
where R: Freeze, S: Freeze,

§

impl<R, S> RefUnwindSafe for StepRange<R, S>

§

impl<R, S> Send for StepRange<R, S>
where R: Send, S: Send,

§

impl<R, S> Sync for StepRange<R, S>
where R: Sync, S: Sync,

§

impl<R, S> Unpin for StepRange<R, S>
where R: Unpin, S: Unpin,

§

impl<R, S> UnwindSafe for StepRange<R, S>
where R: UnwindSafe, 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§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

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

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> IntoCloned<T> for T

Source§

fn clone_to(self, target: &mut T)

Moves an existing object or clones from a reference to the target object.
Source§

fn into_cloned(self) -> T

Returns an existing object or a new clone from a reference.
Source§

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

Source§

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>,

Source§

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>,

Source§

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.