pub struct SafeGenerator<T>(/* private fields */);Implementations§
Source§impl<T> SafeGenerator<T>
impl<T> SafeGenerator<T>
pub fn from_fn( generator_fn: Arc<dyn Fn(SafeGenerator<T>) -> Option<T> + Send + Sync>, ) -> SafeGenerator<T>
pub fn new(selfish: impl SafeGeneratorTrait<T> + 'static) -> SafeGenerator<T>
pub fn next(&self) -> Option<T>
Trait Implementations§
Source§impl<T: Clone> Clone for SafeGenerator<T>
impl<T: Clone> Clone for SafeGenerator<T>
Source§fn clone(&self) -> SafeGenerator<T>
fn clone(&self) -> SafeGenerator<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<T> Freeze for SafeGenerator<T>
impl<T> !RefUnwindSafe for SafeGenerator<T>
impl<T> Send for SafeGenerator<T>
impl<T> Sync for SafeGenerator<T>
impl<T> Unpin for SafeGenerator<T>
impl<T> !UnwindSafe for SafeGenerator<T>
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