pub struct IterTree {
pub variants: Vec<IterNode>,
pub id: u8,
pub span: Span,
}
Expand description
Represents complicated iterator structures.
Fields§
§variants: Vec<IterNode>
The variants of the top-level iterator.
id: u8
The id of the top-level iterator.
span: Span
The span of the top-level iterator.
Implementations§
Source§impl IterTree
impl IterTree
Sourcepub fn get_iter_lengths(
&self,
lengths: &mut HashMap<u8, (usize, Span, Option<Span>)>,
full_span: Span,
) -> Result<(), Error>
pub fn get_iter_lengths( &self, lengths: &mut HashMap<u8, (usize, Span, Option<Span>)>, full_span: Span, ) -> Result<(), Error>
Collect lengths of each iterator mapped to the iterators’ ids.
§Errors
Returns an error when there is an inconsistency in among iterators (same id, different lengths) or when an iterator with id x contains an iterator with id x.
Trait Implementations§
Source§impl From<&ExplicitIterator> for IterTree
impl From<&ExplicitIterator> for IterTree
Source§fn from(value: &ExplicitIterator) -> Self
fn from(value: &ExplicitIterator) -> Self
Converts to this type from the input type.
Source§impl<const ITER: bool> From<&ImplicitIterator<ITER>> for IterTree
impl<const ITER: bool> From<&ImplicitIterator<ITER>> for IterTree
Source§fn from(value: &ImplicitIterator<ITER>) -> Self
fn from(value: &ImplicitIterator<ITER>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for IterTree
impl RefUnwindSafe for IterTree
impl Send for IterTree
impl Sync for IterTree
impl Unpin for IterTree
impl UnwindSafe for IterTree
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> Convert for T
impl<T> Convert for T
Source§fn convert<U>(self, context: &CompileContext) -> Expr<U>where
U: ConvertFrom<T>,
fn convert<U>(self, context: &CompileContext) -> Expr<U>where
U: ConvertFrom<T>,
Convert
self
into a specific type. Read moreSource§fn can_convert<U>(&self) -> boolwhere
U: ConvertFrom<T>,
fn can_convert<U>(&self) -> boolwhere
U: ConvertFrom<T>,
Check if
self
can be converted into a specific type. Read more