Object

Struct Object 

Source
pub struct Object<D>(pub D)
where
    D: Driver;

Tuple Fields§

§0: D

Trait Implementations§

Source§

impl<D> Clone for Object<D>
where D: Clone + Driver,

Source§

fn clone(&self) -> Object<D>

Returns a duplicate 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<D> Debug for Object<D>
where D: Debug + Driver,

Source§

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

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

impl<D> Default for Object<D>
where D: Default + Driver,

Source§

fn default() -> Object<D>

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

impl<D> DerefMut for Object<D>
where D: Driver,

Source§

fn deref_mut(&mut self) -> &mut <Object<D> as Deref>::Target

Mutably dereferences the value.
Source§

impl<D> DynDriver for Object<D>
where D: Driver,

Source§

fn depth(&self) -> usize

Source§

fn set_depth(&mut self, depth: usize)

Source§

fn max_depth(&self) -> usize

Source§

fn gen_variant(&mut self, variants: usize, base_case: usize) -> Option<usize>

Source§

fn gen_u8(&mut self, min: Bound<&u8>, max: Bound<&u8>) -> Option<u8>

Source§

fn gen_i8(&mut self, min: Bound<&i8>, max: Bound<&i8>) -> Option<i8>

Source§

fn gen_u16(&mut self, min: Bound<&u16>, max: Bound<&u16>) -> Option<u16>

Source§

fn gen_i16(&mut self, min: Bound<&i16>, max: Bound<&i16>) -> Option<i16>

Source§

fn gen_u32(&mut self, min: Bound<&u32>, max: Bound<&u32>) -> Option<u32>

Source§

fn gen_i32(&mut self, min: Bound<&i32>, max: Bound<&i32>) -> Option<i32>

Source§

fn gen_u64(&mut self, min: Bound<&u64>, max: Bound<&u64>) -> Option<u64>

Source§

fn gen_i64(&mut self, min: Bound<&i64>, max: Bound<&i64>) -> Option<i64>

Source§

fn gen_u128(&mut self, min: Bound<&u128>, max: Bound<&u128>) -> Option<u128>

Source§

fn gen_i128(&mut self, min: Bound<&i128>, max: Bound<&i128>) -> Option<i128>

Source§

fn gen_usize(&mut self, min: Bound<&usize>, max: Bound<&usize>) -> Option<usize>

Source§

fn gen_isize(&mut self, min: Bound<&isize>, max: Bound<&isize>) -> Option<isize>

Source§

fn gen_f32(&mut self, min: Bound<&f32>, max: Bound<&f32>) -> Option<f32>

Source§

fn gen_f64(&mut self, min: Bound<&f64>, max: Bound<&f64>) -> Option<f64>

Source§

fn gen_char(&mut self, min: Bound<&char>, max: Bound<&char>) -> Option<char>

Source§

fn gen_bool(&mut self, probability: Option<f32>) -> Option<bool>

Source§

fn gen_from_bytes( &mut self, hint: &mut dyn FnMut() -> (usize, Option<usize>), produce: &mut dyn FnMut(&[u8]) -> Option<usize>, ) -> Option<()>

Source§

impl<D> Deref for Object<D>
where D: Driver,

Source§

type Target = D

The resulting type after dereferencing.
Source§

fn deref(&self) -> &<Object<D> as Deref>::Target

Dereferences the value.

Auto Trait Implementations§

§

impl<D> Freeze for Object<D>
where D: Freeze,

§

impl<D> RefUnwindSafe for Object<D>
where D: RefUnwindSafe,

§

impl<D> Send for Object<D>
where D: Send,

§

impl<D> Sync for Object<D>
where D: Sync,

§

impl<D> Unpin for Object<D>
where D: Unpin,

§

impl<D> UnwindSafe for Object<D>
where D: 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<D> Driver for D
where D: DynDriver,

Source§

fn depth(&self) -> usize

Source§

fn set_depth(&mut self, depth: usize)

Source§

fn max_depth(&self) -> usize

Source§

fn gen_variant(&mut self, variants: usize, base_case: usize) -> Option<usize>

Source§

fn gen_u8(&mut self, min: Bound<&u8>, max: Bound<&u8>) -> Option<u8>

Source§

fn gen_i8(&mut self, min: Bound<&i8>, max: Bound<&i8>) -> Option<i8>

Source§

fn gen_u16(&mut self, min: Bound<&u16>, max: Bound<&u16>) -> Option<u16>

Source§

fn gen_i16(&mut self, min: Bound<&i16>, max: Bound<&i16>) -> Option<i16>

Source§

fn gen_u32(&mut self, min: Bound<&u32>, max: Bound<&u32>) -> Option<u32>

Source§

fn gen_i32(&mut self, min: Bound<&i32>, max: Bound<&i32>) -> Option<i32>

Source§

fn gen_u64(&mut self, min: Bound<&u64>, max: Bound<&u64>) -> Option<u64>

Source§

fn gen_i64(&mut self, min: Bound<&i64>, max: Bound<&i64>) -> Option<i64>

Source§

fn gen_u128(&mut self, min: Bound<&u128>, max: Bound<&u128>) -> Option<u128>

Source§

fn gen_i128(&mut self, min: Bound<&i128>, max: Bound<&i128>) -> Option<i128>

Source§

fn gen_usize(&mut self, min: Bound<&usize>, max: Bound<&usize>) -> Option<usize>

Source§

fn gen_isize(&mut self, min: Bound<&isize>, max: Bound<&isize>) -> Option<isize>

Source§

fn gen_f32(&mut self, min: Bound<&f32>, max: Bound<&f32>) -> Option<f32>

Source§

fn gen_f64(&mut self, min: Bound<&f64>, max: Bound<&f64>) -> Option<f64>

Source§

fn gen_char(&mut self, min: Bound<&char>, max: Bound<&char>) -> Option<char>

Source§

fn gen_bool(&mut self, probability: Option<f32>) -> Option<bool>

Source§

fn gen_from_bytes<Hint, Gen, T>( &mut self, hint: Hint, produce: Gen, ) -> Option<T>
where Hint: FnOnce() -> (usize, Option<usize>), Gen: FnMut(&[u8]) -> Option<(usize, T)>,

Generate a value from bytes off this generator Read more
Source§

fn produce<T>(&mut self) -> Option<T>
where T: TypeGenerator,

Generate a value with type T
Source§

fn gen<T>(&mut self) -> Option<T>
where T: TypeGenerator,

👎Deprecated: Use produce instead (gen conflicts with edition2024)
Source§

fn depth_guard<F, R>(&mut self, f: F) -> Option<R>
where F: FnOnce(&mut Self) -> Option<R>,

Source§

fn enter_product<Output, F, Ret>(&mut self, f: F) -> Option<Ret>
where Output: 'static, F: FnMut(&mut Self) -> Option<Ret>,

Source§

fn enter_sum<Output, F, Ret>( &mut self, element_names: Option<&'static [&'static str]>, elements: usize, base_case: usize, f: F, ) -> Option<Ret>
where Output: 'static, F: FnMut(&mut Self, usize) -> Option<Ret>,

Source§

fn enter_list<Output, F, Len, Ret>(&mut self, lens: &Len, f: F) -> Option<Ret>
where Output: 'static, F: FnMut(&mut Self, usize) -> Option<Ret>, Len: ValueGenerator<Output = usize>,

Source§

fn enter_combinator<Output, F, Ret>(&mut self, f: F) -> Option<Ret>
where Output: 'static, F: FnMut(&mut Self) -> Option<Ret>,

Source§

fn gen_u8_constant(&mut self, value: u8) -> Option<u8>

Source§

fn gen_i8_constant(&mut self, value: i8) -> Option<i8>

Source§

fn gen_u16_constant(&mut self, value: u16) -> Option<u16>

Source§

fn gen_i16_constant(&mut self, value: i16) -> Option<i16>

Source§

fn gen_u32_constant(&mut self, value: u32) -> Option<u32>

Source§

fn gen_i32_constant(&mut self, value: i32) -> Option<i32>

Source§

fn gen_u64_constant(&mut self, value: u64) -> Option<u64>

Source§

fn gen_i64_constant(&mut self, value: i64) -> Option<i64>

Source§

fn gen_u128_constant(&mut self, value: u128) -> Option<u128>

Source§

fn gen_i128_constant(&mut self, value: i128) -> Option<i128>

Source§

fn gen_usize_constant(&mut self, value: usize) -> Option<usize>

Source§

fn gen_isize_constant(&mut self, value: isize) -> Option<isize>

Source§

fn gen_f32_constant(&mut self, value: f32) -> Option<f32>

Source§

fn gen_f64_constant(&mut self, value: f64) -> Option<f64>

Source§

fn gen_char_constant(&mut self, value: char) -> Option<char>

Source§

fn cache_put<T>(&mut self, value: T)
where T: 'static,

Source§

fn cache_get<T>(&mut self) -> Option<T>
where T: 'static,

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<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T> RngCore for T
where T: DerefMut, <T as Deref>::Target: RngCore,

Source§

fn next_u32(&mut self) -> u32

Return the next random u32. Read more
Source§

fn next_u64(&mut self) -> u64

Return the next random u64. Read more
Source§

fn fill_bytes(&mut self, dst: &mut [u8])

Fill dest with random data. Read more
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.
Source§

impl<R> TryRngCore for R
where R: RngCore + ?Sized,

Source§

type Error = Infallible

The type returned in the event of a RNG error.
Source§

fn try_next_u32(&mut self) -> Result<u32, <R as TryRngCore>::Error>

Return the next random u32.
Source§

fn try_next_u64(&mut self) -> Result<u64, <R as TryRngCore>::Error>

Return the next random u64.
Source§

fn try_fill_bytes( &mut self, dst: &mut [u8], ) -> Result<(), <R as TryRngCore>::Error>

Fill dest entirely with random data.
Source§

fn unwrap_err(self) -> UnwrapErr<Self>
where Self: Sized,

Wrap RNG with the UnwrapErr wrapper.
Source§

fn unwrap_mut(&mut self) -> UnwrapMut<'_, Self>

Wrap RNG with the UnwrapMut wrapper.
Source§

impl<T> CryptoRng for T
where T: DerefMut, <T as Deref>::Target: CryptoRng,

Source§

impl<R> TryCryptoRng for R
where R: CryptoRng + ?Sized,