pub enum IterableKind {
Array(TypeId),
Tuple(Vec<TypeId>),
String,
SyncIterator {
iterator_type: TypeId,
element_type: TypeId,
},
AsyncIterator {
iterator_type: TypeId,
element_type: TypeId,
},
NotIterable,
}Expand description
Classification of how a type can be iterated.
Used by the Checker to determine valid for-of targets, spread behavior, etc.
Variants§
Array(TypeId)
Array
Tuple(Vec<TypeId>)
Tuple [T, U, V] - provides element union or individual types
String
string - iterates chars
SyncIterator
Has [Symbol.iterator] method returning an iterator
Fields
AsyncIterator
Has [Symbol.asyncIterator] method returning an async iterator
NotIterable
Not iterable
Trait Implementations§
Source§impl Clone for IterableKind
impl Clone for IterableKind
Source§fn clone(&self) -> IterableKind
fn clone(&self) -> IterableKind
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 IterableKind
impl Debug for IterableKind
Source§impl PartialEq for IterableKind
impl PartialEq for IterableKind
impl Eq for IterableKind
impl StructuralPartialEq for IterableKind
Auto Trait Implementations§
impl Freeze for IterableKind
impl RefUnwindSafe for IterableKind
impl Send for IterableKind
impl Sync for IterableKind
impl Unpin for IterableKind
impl UnsafeUnpin for IterableKind
impl UnwindSafe for IterableKind
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.