pub struct DoWhileStmt<'a> {
pub keyword_do: Slice<'a>,
pub body: Box<Stmt<'a>>,
pub keyword_while: Slice<'a>,
pub open_paren: Slice<'a>,
pub test: Expr<'a>,
pub close_paren: Slice<'a>,
pub semi_colon: Option<Slice<'a>>,
}
Expand description
A while loop that executes its body first
do {
console.log('at least once')
} while (Math.floor(Math.random() * 100) < 75)
Fields
keyword_do: Slice<'a>
body: Box<Stmt<'a>>
keyword_while: Slice<'a>
open_paren: Slice<'a>
test: Expr<'a>
close_paren: Slice<'a>
semi_colon: Option<Slice<'a>>
Trait Implementations
sourceimpl<'a> Clone for DoWhileStmt<'a>
impl<'a> Clone for DoWhileStmt<'a>
sourcefn clone(&self) -> DoWhileStmt<'a>
fn clone(&self) -> DoWhileStmt<'a>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<'a> Debug for DoWhileStmt<'a>
impl<'a> Debug for DoWhileStmt<'a>
sourceimpl<'a> From<DoWhileStmt<'a>> for DoWhileStmt<'a>
impl<'a> From<DoWhileStmt<'a>> for DoWhileStmt<'a>
sourcefn from(other: DoWhileStmt<'a>) -> Self
fn from(other: DoWhileStmt<'a>) -> Self
Converts to this type from the input type.
sourceimpl<'a> Node for DoWhileStmt<'a>
impl<'a> Node for DoWhileStmt<'a>
fn loc(&self) -> SourceLocation
sourceimpl<'a> PartialEq<DoWhileStmt<'a>> for DoWhileStmt<'a>
impl<'a> PartialEq<DoWhileStmt<'a>> for DoWhileStmt<'a>
sourcefn eq(&self, other: &DoWhileStmt<'a>) -> bool
fn eq(&self, other: &DoWhileStmt<'a>) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
impl<'a> StructuralPartialEq for DoWhileStmt<'a>
Auto Trait Implementations
impl<'a> RefUnwindSafe for DoWhileStmt<'a>
impl<'a> Send for DoWhileStmt<'a>
impl<'a> Sync for DoWhileStmt<'a>
impl<'a> Unpin for DoWhileStmt<'a>
impl<'a> UnwindSafe for DoWhileStmt<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more