Struct kodept_ast::Operation
source · pub struct Operation(/* private fields */);Implementations§
source§impl Operation
impl Operation
pub fn as_application(&self) -> Option<&Application>
pub fn as_application_mut(&mut self) -> Option<&mut Application>
pub fn as_access(&self) -> Option<&Access>
pub fn as_access_mut(&mut self) -> Option<&mut Access>
pub fn as_unary(&self) -> Option<&Unary>
pub fn as_unary_mut(&mut self) -> Option<&mut Unary>
pub fn as_binary(&self) -> Option<&Binary>
pub fn as_binary_mut(&mut self) -> Option<&mut Binary>
pub fn as_block(&self) -> Option<&ExpressionBlock>
pub fn as_block_mut(&mut self) -> Option<&mut ExpressionBlock>
pub fn as_expression(&self) -> Option<&Expression>
pub fn as_expression_mut(&mut self) -> Option<&mut Expression>
Trait Implementations§
source§impl From<GenericASTNode> for Operation
impl From<GenericASTNode> for Operation
source§fn from(original: GenericASTNode) -> Operation
fn from(original: GenericASTNode) -> Operation
Converts to this type from the input type.
source§impl From<Operation> for GenericASTNode
impl From<Operation> for GenericASTNode
source§impl NodeUnion for Operation
impl NodeUnion for Operation
fn contains(node: &GenericASTNode) -> bool
fn wrap(node: &GenericASTNode) -> &Self
fn wrap_mut(node: &mut GenericASTNode) -> &mut Self
source§impl PartialEq for Operation
impl PartialEq for Operation
source§impl<'a> TryFrom<&'a GenericASTNode> for &'a Operation
impl<'a> TryFrom<&'a GenericASTNode> for &'a Operation
§type Error = <&'a GenericASTNode as TryFrom<&'a GenericASTNode>>::Error
type Error = <&'a GenericASTNode as TryFrom<&'a GenericASTNode>>::Error
The type returned in the event of a conversion error.
source§impl<'a> TryFrom<&'a mut GenericASTNode> for &'a mut Operation
impl<'a> TryFrom<&'a mut GenericASTNode> for &'a mut Operation
§type Error = <&'a mut GenericASTNode as TryFrom<&'a mut GenericASTNode>>::Error
type Error = <&'a mut GenericASTNode as TryFrom<&'a mut GenericASTNode>>::Error
The type returned in the event of a conversion error.
impl StructuralPartialEq for Operation
Auto Trait Implementations§
impl RefUnwindSafe for Operation
impl Send for Operation
impl Sync for Operation
impl Unpin for Operation
impl UnwindSafe for Operation
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