pub struct While { /* private fields */ }
Expand description
A while loop
Implementations
sourceimpl 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
sourceimpl<'de> Deserialize<'de> for While
impl<'de> Deserialize<'de> for While
sourcefn 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
sourceimpl Node for While
impl Node for While
sourcefn start_position(&self) -> Option<Position>
fn start_position(&self) -> Option<Position>
The start position of a node. None if can’t be determined
sourcefn end_position(&self) -> Option<Position>
fn end_position(&self) -> Option<Position>
The end position of a node. None if it can’t be determined
sourcefn 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
sourcefn tokens<'a>(&'a self) -> Tokens<'a>ⓘNotable traits for Tokens<'a>impl<'a> Iterator for Tokens<'a> type Item = &'a TokenReference;
fn tokens<'a>(&'a self) -> Tokens<'a>ⓘNotable traits for Tokens<'a>impl<'a> Iterator for Tokens<'a> type Item = &'a TokenReference;
The token references that comprise a node
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more