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§impl PartialOrd for NodeScillaType
impl PartialOrd for NodeScillaType
impl Eq for NodeScillaType
impl StructuralPartialEq for NodeScillaType
Auto Trait Implementations§
impl Freeze for NodeScillaType
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