pub enum LoopPattern {
ForRange {
var_name: String,
range: RangeInfo,
},
ForIterator {
var_name: String,
iterator: String,
},
While {
condition: String,
},
Infinite,
}Expand description
Represents different loop patterns that can be transpiled.
Variants§
ForRange
A for loop over a range: for i in start..end
ForIterator
A for loop over an iterator (not fully supported yet)
While
A while loop: while condition { ... }
Infinite
An infinite loop: loop { ... }
Implementations§
Source§impl LoopPattern
impl LoopPattern
Trait Implementations§
Source§impl Clone for LoopPattern
impl Clone for LoopPattern
Source§fn clone(&self) -> LoopPattern
fn clone(&self) -> LoopPattern
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for LoopPattern
impl RefUnwindSafe for LoopPattern
impl Send for LoopPattern
impl Sync for LoopPattern
impl Unpin for LoopPattern
impl UnwindSafe for LoopPattern
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)