pub struct Gen<A> { /* private fields */ }Expand description
Generator that generates values.
値を生成するジェネレータ。
Implementations§
source§impl<A: Clone + 'static> Gen<A>
impl<A: Clone + 'static> Gen<A>
sourcepub fn run(self, rng: RNG) -> (A, RNG)
pub fn run(self, rng: RNG) -> (A, RNG)
Evaluates expressions held by the Gen and generates values.
Genが保持する式を評価し値を生成します。
sourcepub fn new<B>(b: State<RNG, B>) -> Gen<B>
pub fn new<B>(b: State<RNG, B>) -> Gen<B>
Generate a Gen by specifying a State.
Stateを指定してGenを生成します。
Trait Implementations§
Auto Trait Implementations§
impl<A> Freeze for Gen<A>
impl<A> !RefUnwindSafe for Gen<A>
impl<A> !Send for Gen<A>
impl<A> !Sync for Gen<A>
impl<A> Unpin for Gen<A>
impl<A> !UnwindSafe for Gen<A>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more