Enum scilla_parser::ast::nodes::NodeScillaType
source · pub enum NodeScillaType {
GenericTypeWithArgs(WithMetaData<NodeMetaIdentifier>, Vec<WithMetaData<NodeTypeArgument>>),
MapType(WithMetaData<NodeTypeMapKey>, WithMetaData<NodeTypeMapValue>),
FunctionType(Box<WithMetaData<NodeScillaType>>, Box<WithMetaData<NodeScillaType>>),
EnclosedType(Box<WithMetaData<NodeScillaType>>),
ScillaAddresseType(Box<WithMetaData<NodeAddressType>>),
PolyFunctionType(WithMetaData<String>, Box<WithMetaData<NodeScillaType>>),
TypeVarType(WithMetaData<String>),
}Expand description
NodeScillaType represents a Scilla type node in the AST
Variants§
GenericTypeWithArgs(WithMetaData<NodeMetaIdentifier>, Vec<WithMetaData<NodeTypeArgument>>)
Represents a generic type with arguments
Example: let x: CustomType ArgType = "type";
MapType(WithMetaData<NodeTypeMapKey>, WithMetaData<NodeTypeMapValue>)
Represents a map type
Example: let x: Map (KeyType, ValueType) = Emp;
FunctionType(Box<WithMetaData<NodeScillaType>>, Box<WithMetaData<NodeScillaType>>)
Represents a function type
Example: let x: Fun (ArgType) ReturnType = fun (arg : ArgType) => arg;
EnclosedType(Box<WithMetaData<NodeScillaType>>)
Represents an enclosed type
Example: let x: (CustomType) = "type";
ScillaAddresseType(Box<WithMetaData<NodeAddressType>>)
Represents a Scilla address type
Example: let x: ByStr20 = "0x123";
PolyFunctionType(WithMetaData<String>, Box<WithMetaData<NodeScillaType>>)
Represents a poly function type
Example: let x: forall 'A. ('A -> 'A) = fun (arg : 'A) => arg;
TypeVarType(WithMetaData<String>)
Represents a type var type
Example: let x: 'A = "type";
Trait Implementations§
source§impl AstVisitor for NodeScillaType
impl AstVisitor for NodeScillaType
fn visit( &self, emitter: &mut dyn AstConverting ) -> Result<TraversalResult, String>
source§impl Clone for NodeScillaType
impl Clone for NodeScillaType
source§fn clone(&self) -> NodeScillaType
fn clone(&self) -> NodeScillaType
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for NodeScillaType
impl Debug for NodeScillaType
source§impl PartialEq for NodeScillaType
impl PartialEq for NodeScillaType
source§fn eq(&self, other: &NodeScillaType) -> bool
fn eq(&self, other: &NodeScillaType) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl PartialOrd for NodeScillaType
impl PartialOrd for NodeScillaType
source§fn partial_cmp(&self, other: &NodeScillaType) -> Option<Ordering>
fn partial_cmp(&self, other: &NodeScillaType) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moreimpl Eq for NodeScillaType
impl StructuralEq for NodeScillaType
impl StructuralPartialEq for NodeScillaType
Auto Trait Implementations§
impl RefUnwindSafe for NodeScillaType
impl Send for NodeScillaType
impl Sync for NodeScillaType
impl Unpin for NodeScillaType
impl UnwindSafe for NodeScillaType
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