Struct checkito::array::Array

source ·
pub struct Array<T: ?Sized, const N: usize>(pub T);

Tuple Fields§

§0: T

Trait Implementations§

source§

impl<T: Clone + ?Sized, const N: usize> Clone for Array<T, N>

source§

fn clone(&self) -> Array<T, N>

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<T: Debug + ?Sized, const N: usize> Debug for Array<T, N>

source§

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

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

impl<T: Default + ?Sized, const N: usize> Default for Array<T, N>

source§

fn default() -> Array<T, N>

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

impl<G: FullGenerate, const N: usize> FullGenerate for Array<G, N>

source§

impl<S: FullShrink, const N: usize> FullShrink for Array<S, N>

source§

type Item = [<S as FullShrink>::Item; N]

source§

type Shrink = All<[<S as FullShrink>::Shrink; N]>

source§

fn shrinker(item: Self::Item) -> Option<Self::Shrink>

source§

impl<G: Generate + ?Sized, const N: usize> Generate for Array<G, N>

source§

type Item = [<G as Generate>::Item; N]

source§

type Shrink = All<[<G as Generate>::Shrink; N]>

source§

fn generate(&self, state: &mut State) -> Self::Shrink

Primary method of this trait. It generates a Shrink instance that will be able to produce values of type Generate::Item and shrink itself.
source§

fn sampler(&self) -> Sampler<'_, Self>

Provides a Sampler that allows to configure sampling settings and generate samples.
source§

fn samples(&self, count: usize) -> Samples<'_, Self>

Generates count random values the are progressively larger in size. For additional sampling settings, see Generate::sampler.
source§

fn sample(&self, size: f64) -> Self::Item

Generates a random value of size (0.0..=1.0). For additional sampling settings, see Generate::sampler.
source§

fn checker(&self) -> Checker<'_, Self>

source§

fn checks<P: Prove, F: FnMut(&Self::Item) -> P>( &self, count: usize, check: F, ) -> Checks<'_, Self, F>

source§

fn check<P: Prove, F: FnMut(&Self::Item) -> P>( &self, count: usize, check: F, ) -> Result<(), Error<Self::Item, P>>

source§

impl<G: IntoGenerate, const N: usize> IntoGenerate for Array<G, N>

source§

impl<S: IntoShrink, const N: usize> IntoShrink for Array<S, N>

source§

type Item = [<S as IntoShrink>::Item; N]

source§

type Shrink = All<[<S as IntoShrink>::Shrink; N]>

source§

fn shrinker(&self, item: Self::Item) -> Option<Self::Shrink>

Auto Trait Implementations§

§

impl<T, const N: usize> Freeze for Array<T, N>
where T: Freeze + ?Sized,

§

impl<T, const N: usize> RefUnwindSafe for Array<T, N>
where T: RefUnwindSafe + ?Sized,

§

impl<T, const N: usize> Send for Array<T, N>
where T: Send + ?Sized,

§

impl<T, const N: usize> Sync for Array<T, N>
where T: Sync + ?Sized,

§

impl<T, const N: usize> Unpin for Array<T, N>
where T: Unpin + ?Sized,

§

impl<T, const N: usize> UnwindSafe for Array<T, N>
where T: UnwindSafe + ?Sized,

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