pub struct NativeGenerator { /* private fields */ }
Implementations§
Source§impl NativeGenerator
impl NativeGenerator
pub fn new<B>(name: &'static str, body: B) -> Self
pub fn new_with_dynamic_name<N, B>(name: N, body: B) -> Self
pub fn name(&self) -> &str
pub fn resume(&mut self, globals: &mut Globals, arg: Value) -> ResumeResult
pub fn unpack(&mut self, globals: &mut Globals) -> Result<Vec<Value>>
pub fn iter<'a>( &'a mut self, globals: &'a mut Globals, ) -> impl Iterator<Item = Result<Value>> + 'a
Trait Implementations§
Source§impl Debug for NativeGenerator
impl Debug for NativeGenerator
Source§impl From<NativeGenerator> for Value
impl From<NativeGenerator> for Value
Source§fn from(gen: NativeGenerator) -> Self
fn from(gen: NativeGenerator) -> Self
Converts to this type from the input type.
Source§impl PartialEq for NativeGenerator
impl PartialEq for NativeGenerator
Auto Trait Implementations§
impl Freeze for NativeGenerator
impl !RefUnwindSafe for NativeGenerator
impl !Send for NativeGenerator
impl !Sync for NativeGenerator
impl Unpin for NativeGenerator
impl !UnwindSafe for NativeGenerator
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