pub struct Scope<'a, A, T> { /* private fields */ }
Expand description
passed in scope type it not use the context to pass data, but keep it’s own data ref this struct provide both compile type info and runtime data
Implementations
sourceimpl<'a, A, T> Scope<'a, A, T>
impl<'a, A, T> Scope<'a, A, T>
sourcepub fn yield_with(&mut self, v: T)
pub fn yield_with(&mut self, v: T)
yield something without catch passed in para
sourcepub fn yield_from(&mut self, g: Generator<'_, A, T>) -> Option<A>
pub fn yield_from(&mut self, g: Generator<'_, A, T>) -> Option<A>
yield_from
the from generator must has the same type as itself
Auto Trait Implementations
impl<'a, A, T> RefUnwindSafe for Scope<'a, A, T> where
A: RefUnwindSafe,
T: RefUnwindSafe,
impl<'a, A, T> Send for Scope<'a, A, T> where
A: Send,
T: Send,
impl<'a, A, T> Sync for Scope<'a, A, T> where
A: Sync,
T: Sync,
impl<'a, A, T> Unpin for Scope<'a, A, T>
impl<'a, A, T> !UnwindSafe for Scope<'a, A, T>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more