pub struct IteratorInfo {
pub iterator_type: TypeId,
pub yield_type: TypeId,
pub return_type: TypeId,
pub next_type: TypeId,
}Expand description
Information about an iterator type extracted from a type.
This struct captures the key types needed for iterator/generator type checking:
- The iterator object type itself
- The type yielded by next().value (T in Iterator
) - The type returned when done (
TReturninIteratorResult<T,TReturn>) - The type accepted by
next()(TNextin Iterator<T,TReturn,TNext>)
Fields§
§iterator_type: TypeIdThe iterator object type (has next() method)
yield_type: TypeIdThe type yielded by the iterator (from IteratorResult<T, TReturn>)
return_type: TypeIdThe return type when iteration completes
next_type: TypeIdThe type accepted by next(val) (contravariant)
Trait Implementations§
Source§impl Clone for IteratorInfo
impl Clone for IteratorInfo
Source§fn clone(&self) -> IteratorInfo
fn clone(&self) -> IteratorInfo
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 moreSource§impl Debug for IteratorInfo
impl Debug for IteratorInfo
Source§impl PartialEq for IteratorInfo
impl PartialEq for IteratorInfo
impl Eq for IteratorInfo
impl StructuralPartialEq for IteratorInfo
Auto Trait Implementations§
impl Freeze for IteratorInfo
impl RefUnwindSafe for IteratorInfo
impl Send for IteratorInfo
impl Sync for IteratorInfo
impl Unpin for IteratorInfo
impl UnsafeUnpin for IteratorInfo
impl UnwindSafe for IteratorInfo
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.