pub struct Loop { /* private fields */ }Expand description
A forever loop statement.
Trait Implementations§
Source§impl Statement for Loop
impl Statement for Loop
Source§fn write(&self, b: &mut CodeBuffer, level: usize)
fn write(&self, b: &mut CodeBuffer, level: usize)
Writes the code to the buffer
b at the indent level.Source§impl WithStatements for Loop
impl WithStatements for Loop
Source§fn statements(&self) -> &[Box<dyn Statement>]
fn statements(&self) -> &[Box<dyn Statement>]
Gets the statements.
Source§fn add_boxed_statement(&mut self, statement: Box<dyn Statement>)
fn add_boxed_statement(&mut self, statement: Box<dyn Statement>)
Adds the boxed
statement.Source§fn with_boxed_statement(self, statement: Box<dyn Statement>) -> Self
fn with_boxed_statement(self, statement: Box<dyn Statement>) -> Self
Adds the boxed
statement.Source§fn add_statement<S>(&mut self, statement: S)where
S: 'static + Statement,
fn add_statement<S>(&mut self, statement: S)where
S: 'static + Statement,
Adds the
statement.Source§fn with_statement<S>(self, statement: S) -> Selfwhere
S: 'static + Statement,
fn with_statement<S>(self, statement: S) -> Selfwhere
S: 'static + Statement,
Adds the
statement.Source§fn add_literal<L>(&mut self, literal: L)
fn add_literal<L>(&mut self, literal: L)
Adds the
literal statement.Source§fn with_literal<L>(self, literal: L) -> Self
fn with_literal<L>(self, literal: L) -> Self
Adds the
literal statement.Source§fn add_expression_statement<E>(&mut self, expression: E)where
E: 'static + Expression,
fn add_expression_statement<E>(&mut self, expression: E)where
E: 'static + Expression,
Adds the
expression as a statement.Source§fn with_expression_statement<E>(self, expression: E) -> Selfwhere
E: 'static + Expression,
fn with_expression_statement<E>(self, expression: E) -> Selfwhere
E: 'static + Expression,
Adds the
expression as a statement.Source§fn write_statements(&self, b: &mut CodeBuffer, level: usize)
fn write_statements(&self, b: &mut CodeBuffer, level: usize)
Writes the statements.
Source§fn write_curly_statement_block(&self, b: &mut CodeBuffer, level: usize)
fn write_curly_statement_block(&self, b: &mut CodeBuffer, level: usize)
Writes the curly-bracketed statement block. (
level is the outer level)Auto Trait Implementations§
impl Freeze for Loop
impl !RefUnwindSafe for Loop
impl !Send for Loop
impl !Sync for Loop
impl Unpin for Loop
impl !UnwindSafe for Loop
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