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