Struct kodept_ast::Expression
source · pub struct Expression(/* private fields */);Implementations§
source§impl Expression
impl Expression
pub fn as_lambda(&self) -> Option<&Lambda>
pub fn as_lambda_mut(&mut self) -> Option<&mut Lambda>
pub fn as_if(&self) -> Option<&IfExpression>
pub fn as_if_mut(&mut self) -> Option<&mut IfExpression>
pub fn as_literal(&self) -> Option<&Literal>
pub fn as_literal_mut(&mut self) -> Option<&mut Literal>
pub fn as_term(&self) -> Option<&Term>
pub fn as_term_mut(&mut self) -> Option<&mut Term>
Trait Implementations§
source§impl Debug for Expression
impl Debug for Expression
source§impl From<Expression> for GenericASTNode
impl From<Expression> for GenericASTNode
source§fn from(original: Expression) -> Self
fn from(original: Expression) -> Self
Converts to this type from the input type.
source§impl From<GenericASTNode> for Expression
impl From<GenericASTNode> for Expression
source§fn from(original: GenericASTNode) -> Expression
fn from(original: GenericASTNode) -> Expression
Converts to this type from the input type.
source§impl NodeUnion for Expression
impl NodeUnion for Expression
fn contains(node: &GenericASTNode) -> bool
fn wrap(node: &GenericASTNode) -> &Self
fn wrap_mut(node: &mut GenericASTNode) -> &mut Self
source§impl PartialEq for Expression
impl PartialEq for Expression
source§fn eq(&self, other: &Expression) -> bool
fn eq(&self, other: &Expression) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl<'a> TryFrom<&'a GenericASTNode> for &'a Expression
impl<'a> TryFrom<&'a GenericASTNode> for &'a Expression
§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 Expression
impl<'a> TryFrom<&'a mut GenericASTNode> for &'a mut Expression
§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 Expression
Auto Trait Implementations§
impl RefUnwindSafe for Expression
impl Send for Expression
impl Sync for Expression
impl Unpin for Expression
impl UnwindSafe for Expression
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