Struct kodept_ast::Body
source · pub struct Body(/* private fields */);Implementations§
source§impl Body
impl Body
pub fn as_block(&self) -> Option<&ExpressionBlock>
pub fn as_block_mut(&mut self) -> Option<&mut ExpressionBlock>
pub fn as_simple(&self) -> Option<&BlockLevel>
pub fn as_simple_mut(&mut self) -> Option<&mut BlockLevel>
Trait Implementations§
source§impl From<Body> for GenericASTNode
impl From<Body> for GenericASTNode
source§impl From<GenericASTNode> for Body
impl From<GenericASTNode> for Body
source§fn from(original: GenericASTNode) -> Body
fn from(original: GenericASTNode) -> Body
Converts to this type from the input type.
source§impl NodeUnion for Body
impl NodeUnion for Body
fn contains(node: &GenericASTNode) -> bool
fn wrap(node: &GenericASTNode) -> &Self
fn wrap_mut(node: &mut GenericASTNode) -> &mut Self
source§impl PartialEq for Body
impl PartialEq for Body
source§impl<'a> TryFrom<&'a GenericASTNode> for &'a Body
impl<'a> TryFrom<&'a GenericASTNode> for &'a Body
§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 Body
impl<'a> TryFrom<&'a mut GenericASTNode> for &'a mut Body
§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 Body
Auto Trait Implementations§
impl RefUnwindSafe for Body
impl Send for Body
impl Sync for Body
impl Unpin for Body
impl UnwindSafe for Body
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