Enum indicating the state of a generator.
Trait Implementations
impl PartialEq
for GeneratorState
Compare two values for equality.
Examples
assert_eq!;
assert_eq!;
assert_eq!;
Compare two values for inequality.
Examples
assert_eq!;
assert_eq!;
assert_eq!;
impl Eq
for GeneratorState
impl Clone
for GeneratorState
Clone the specified value
.
Examples
let a = 42;
let b = a;
let c = a.clone;
a += 1;
assert_eq!;
assert_eq!;
assert_eq!;
Protocols
protocol IS_VARIANT
Test if the provided argument is a variant.
protocol PARTIAL_EQ
if value == b
Test for partial equality over a generator state.
Examples
use ;
let g = generate;
assert_eq!;
assert_eq!;
assert_eq!;
``
protocol EQ
if value == b
Test for total equality over a generator state.
Examples
use ;
use eq;
let g = generate;
assert!;
assert!;
assert!;
``
protocol DEBUG_FMT
format!
Debug print this generator state.
Examples
use GeneratorState;
let a = Yielded;
let b = Complete;
println!;
println!;
``
protocol CLONE
let $out = clone
Clone a generator state.
Examples
use GeneratorState;
let a = Yielded;
let b = a.clone;
assert_eq!;
``