Struct kodept_ast::IfExpression
source · pub struct IfExpression { /* private fields */ }Implementations§
source§impl IfExpression
impl IfExpression
pub fn condition<'a>( &self, tree: &'a SyntaxTree, token: &'a GhostToken ) -> ChildrenRef<'a, IfExpression, ContainerT<Identity<Operation>>>
pub fn condition_mut<'a>(&self, tree: &'a mut SyntaxTree)
source§impl IfExpression
impl IfExpression
pub fn body<'a>( &self, tree: &'a SyntaxTree, token: &'a GhostToken ) -> ChildrenRef<'a, IfExpression, ContainerT<Identity<Body>>>
pub fn body_mut<'a>(&self, tree: &'a mut SyntaxTree)
source§impl IfExpression
impl IfExpression
pub fn elifs<'a>( &self, tree: &'a SyntaxTree, token: &'a GhostToken ) -> ChildrenRef<'a, IfExpression, ContainerT<Vec<ElifExpression>>>
pub fn elifs_mut<'a>(&self, tree: &'a mut SyntaxTree)
source§impl IfExpression
impl IfExpression
pub fn elses<'a>( &self, tree: &'a SyntaxTree, token: &'a GhostToken ) -> ChildrenRef<'a, IfExpression, ContainerT<Option<ElseExpression>>>
pub fn elses_mut<'a>(&self, tree: &'a mut SyntaxTree)
Trait Implementations§
source§impl Debug for IfExpression
impl Debug for IfExpression
source§impl From<IfExpression> for GenericASTNode
impl From<IfExpression> for GenericASTNode
source§fn from(original: IfExpression) -> GenericASTNode
fn from(original: IfExpression) -> GenericASTNode
Converts to this type from the input type.
source§impl HasChildrenMarker<<Identity<Body> as FromOptVec>::T> for IfExpression
impl HasChildrenMarker<<Identity<Body> as FromOptVec>::T> for IfExpression
type Container = Identity<Body>
fn get_children<'b>(
&self,
tree: &'b SyntaxTree,
token: &'b GhostToken
) -> ChildrenRef<'b, Self, Child>where
for<'a> &'a Child: TryFrom<&'a GenericASTNode>,
Self: 'static,
for<'a> <&'a GenericASTNode as TryInto<&'a Child>>::Error: Debug,
fn for_children_mut<'b, F, T>(
&self,
tree: &'b mut SyntaxTree,
handler: F
) -> Vec<T>where
for<'a> &'a mut Child: TryFrom<&'a mut GenericASTNode>,
Self: 'static,
F: FnMut(&mut Child) -> T,
source§impl HasChildrenMarker<<Identity<Operation> as FromOptVec>::T> for IfExpression
impl HasChildrenMarker<<Identity<Operation> as FromOptVec>::T> for IfExpression
type Container = Identity<Operation>
fn get_children<'b>(
&self,
tree: &'b SyntaxTree,
token: &'b GhostToken
) -> ChildrenRef<'b, Self, Child>where
for<'a> &'a Child: TryFrom<&'a GenericASTNode>,
Self: 'static,
for<'a> <&'a GenericASTNode as TryInto<&'a Child>>::Error: Debug,
fn for_children_mut<'b, F, T>(
&self,
tree: &'b mut SyntaxTree,
handler: F
) -> Vec<T>where
for<'a> &'a mut Child: TryFrom<&'a mut GenericASTNode>,
Self: 'static,
F: FnMut(&mut Child) -> T,
source§impl HasChildrenMarker<<Option<ElseExpression> as FromOptVec>::T> for IfExpression
impl HasChildrenMarker<<Option<ElseExpression> as FromOptVec>::T> for IfExpression
type Container = Option<ElseExpression>
fn get_children<'b>(
&self,
tree: &'b SyntaxTree,
token: &'b GhostToken
) -> ChildrenRef<'b, Self, Child>where
for<'a> &'a Child: TryFrom<&'a GenericASTNode>,
Self: 'static,
for<'a> <&'a GenericASTNode as TryInto<&'a Child>>::Error: Debug,
fn for_children_mut<'b, F, T>(
&self,
tree: &'b mut SyntaxTree,
handler: F
) -> Vec<T>where
for<'a> &'a mut Child: TryFrom<&'a mut GenericASTNode>,
Self: 'static,
F: FnMut(&mut Child) -> T,
source§impl HasChildrenMarker<<Vec<ElifExpression> as FromOptVec>::T> for IfExpression
impl HasChildrenMarker<<Vec<ElifExpression> as FromOptVec>::T> for IfExpression
type Container = Vec<ElifExpression>
fn get_children<'b>(
&self,
tree: &'b SyntaxTree,
token: &'b GhostToken
) -> ChildrenRef<'b, Self, Child>where
for<'a> &'a Child: TryFrom<&'a GenericASTNode>,
Self: 'static,
for<'a> <&'a GenericASTNode as TryInto<&'a Child>>::Error: Debug,
fn for_children_mut<'b, F, T>(
&self,
tree: &'b mut SyntaxTree,
handler: F
) -> Vec<T>where
for<'a> &'a mut Child: TryFrom<&'a mut GenericASTNode>,
Self: 'static,
F: FnMut(&mut Child) -> T,
source§impl Identifiable for IfExpression
impl Identifiable for IfExpression
source§impl PartialEq for IfExpression
impl PartialEq for IfExpression
source§fn eq(&self, other: &IfExpression) -> bool
fn eq(&self, other: &IfExpression) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl<'__deriveMoreLifetime> TryFrom<&'__deriveMoreLifetime GenericASTNode> for &'__deriveMoreLifetime IfExpression
impl<'__deriveMoreLifetime> TryFrom<&'__deriveMoreLifetime GenericASTNode> for &'__deriveMoreLifetime IfExpression
source§impl<'__deriveMoreLifetime> TryFrom<&'__deriveMoreLifetime mut GenericASTNode> for &'__deriveMoreLifetime mut IfExpression
impl<'__deriveMoreLifetime> TryFrom<&'__deriveMoreLifetime mut GenericASTNode> for &'__deriveMoreLifetime mut IfExpression
source§impl TryFrom<GenericASTNode> for IfExpression
impl TryFrom<GenericASTNode> for IfExpression
impl StructuralPartialEq for IfExpression
Auto Trait Implementations§
impl RefUnwindSafe for IfExpression
impl Send for IfExpression
impl Sync for IfExpression
impl Unpin for IfExpression
impl UnwindSafe for IfExpression
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