pub struct SomniIterator<T: TypeSet> { /* private fields */ }Expand description
A live iterator value, backed by a reference-counted Rust iterator.
This is the TypeSet::Iterator type used by WithIterator: a
TypedValue::Iter carries one of these directly (cloning shares the same
underlying iterator). Return one from a function registered on a
Context that uses a WithIterator type set to make it
iterable with a for loop.
Implementations§
Source§impl<T: TypeSet> SomniIterator<T>
impl<T: TypeSet> SomniIterator<T>
Sourcepub fn new<I>(iter: I) -> Selfwhere
I: IntoIterator<Item = TypedValue<T>> + 'static,
pub fn new<I>(iter: I) -> Selfwhere
I: IntoIterator<Item = TypedValue<T>> + 'static,
Creates an iterator from anything that yields Somni values.
Trait Implementations§
Source§impl<T: TypeSet> Clone for SomniIterator<T>
impl<T: TypeSet> Clone for SomniIterator<T>
Source§impl<T: TypeSet> Debug for SomniIterator<T>
impl<T: TypeSet> Debug for SomniIterator<T>
Source§impl<T> LoadStore<WithIterator<T>> for SomniIterator<T>
impl<T> LoadStore<WithIterator<T>> for SomniIterator<T>
Source§type Output<'s> = SomniIterator<T>
type Output<'s> = SomniIterator<T>
The type of the result.
Source§fn load<'s>(
_ctx: &'s WithIterator<T>,
typed: &'s TypedValue<WithIterator<T>>,
) -> Option<Self::Output<'s>>
fn load<'s>( _ctx: &'s WithIterator<T>, typed: &'s TypedValue<WithIterator<T>>, ) -> Option<Self::Output<'s>>
Loads a borrowed value from the given type context.
Source§fn store(&self, _ctx: &mut WithIterator<T>) -> TypedValue<WithIterator<T>>
fn store(&self, _ctx: &mut WithIterator<T>) -> TypedValue<WithIterator<T>>
Stores a Rust value into a TypedValue using the given type context.
Auto Trait Implementations§
impl<T> !RefUnwindSafe for SomniIterator<T>
impl<T> !Send for SomniIterator<T>
impl<T> !Sync for SomniIterator<T>
impl<T> !UnwindSafe for SomniIterator<T>
impl<T> Freeze for SomniIterator<T>
impl<T> Unpin for SomniIterator<T>
impl<T> UnsafeUnpin for SomniIterator<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