pub struct While { /* private fields */ }
Expand description
A while loop
Implementations§
source§impl While
impl While
sourcepub fn new(condition: Expression) -> Self
pub fn new(condition: Expression) -> Self
Creates a new While from the given condition
sourcepub fn while_token(&self) -> &TokenReference
pub fn while_token(&self) -> &TokenReference
The while
token
sourcepub fn condition(&self) -> &Expression
pub fn condition(&self) -> &Expression
The condition
part of while condition do
sourcepub fn do_token(&self) -> &TokenReference
pub fn do_token(&self) -> &TokenReference
The do
token
sourcepub fn end_token(&self) -> &TokenReference
pub fn end_token(&self) -> &TokenReference
The end
token
sourcepub fn with_while_token(self, while_token: TokenReference) -> Self
pub fn with_while_token(self, while_token: TokenReference) -> Self
Returns a new While with the given while
token
sourcepub fn with_condition(self, condition: Expression) -> Self
pub fn with_condition(self, condition: Expression) -> Self
Returns a new While with the given condition
sourcepub fn with_do_token(self, do_token: TokenReference) -> Self
pub fn with_do_token(self, do_token: TokenReference) -> Self
Returns a new While with the given do
token
sourcepub fn with_block(self, block: Block) -> Self
pub fn with_block(self, block: Block) -> Self
Returns a new While with the given block
sourcepub fn with_end_token(self, end_token: TokenReference) -> Self
pub fn with_end_token(self, end_token: TokenReference) -> Self
Returns a new While with the given end
token
Trait Implementations§
source§impl<'de> Deserialize<'de> for While
impl<'de> Deserialize<'de> for While
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Node for While
impl Node for While
source§fn start_position(&self) -> Option<Position>
fn start_position(&self) -> Option<Position>
The start position of a node. None if can’t be determined
source§fn end_position(&self) -> Option<Position>
fn end_position(&self) -> Option<Position>
The end position of a node. None if it can’t be determined
source§fn similar(&self, other: &Self) -> bool
fn similar(&self, other: &Self) -> bool
Whether another node of the same type is the same as this one semantically, ignoring position
source§impl PartialEq for While
impl PartialEq for While
impl StructuralPartialEq for While
Auto Trait Implementations§
impl RefUnwindSafe for While
impl Send for While
impl Sync for While
impl Unpin for While
impl UnwindSafe for While
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