Struct kodept_ast::Type
source · pub struct Type(/* private fields */);Implementations§
source§impl Type
impl Type
pub fn as_type_name(&self) -> Option<&TypeName>
pub fn as_type_name_mut(&mut self) -> Option<&mut TypeName>
pub fn as_tuple(&self) -> Option<&ProdType>
pub fn as_tuple_mut(&mut self) -> Option<&mut ProdType>
pub fn as_union(&self) -> Option<&SumType>
pub fn as_union_mut(&mut self) -> Option<&mut SumType>
Trait Implementations§
source§impl From<GenericASTNode> for Type
impl From<GenericASTNode> for Type
source§fn from(original: GenericASTNode) -> Type
fn from(original: GenericASTNode) -> Type
Converts to this type from the input type.
source§impl From<Type> for GenericASTNode
impl From<Type> for GenericASTNode
source§impl NodeUnion for Type
impl NodeUnion for Type
fn contains(node: &GenericASTNode) -> bool
fn wrap(node: &GenericASTNode) -> &Self
fn wrap_mut(node: &mut GenericASTNode) -> &mut Self
source§impl PartialEq for Type
impl PartialEq for Type
source§impl<'a> TryFrom<&'a GenericASTNode> for &'a Type
impl<'a> TryFrom<&'a GenericASTNode> for &'a Type
§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 Type
impl<'a> TryFrom<&'a mut GenericASTNode> for &'a mut Type
§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 Type
Auto Trait Implementations§
impl RefUnwindSafe for Type
impl Send for Type
impl Sync for Type
impl Unpin for Type
impl UnwindSafe for Type
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