Struct generator::Scope [−][src]
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
impl<'a, A, T> Scope<'a, A, T>
[src]
pub fn yield_with(&mut self, v: T)
[src]
yield something without catch passed in para
pub fn get_yield(&mut self) -> Option<A>
[src]
get current generator send para
pub fn yield_(&mut self, v: T) -> Option<A>
[src]
yield and get the send para
pub fn yield_from(&mut self, g: Generator<'_, A, T>) -> Option<A>
[src]
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,
A: RefUnwindSafe,
T: RefUnwindSafe,
impl<'a, A, T> Send for Scope<'a, A, T> where
A: Send,
T: Send,
A: Send,
T: Send,
impl<'a, A, T> Sync for Scope<'a, A, T> where
A: Sync,
T: Sync,
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
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,