pub enum TypeRef {
SimpleType(SimpleType),
Named {
name: String,
scope: Scope,
is_simple: bool,
is_enumerate: bool,
},
Entity {
name: String,
scope: Scope,
is_supertype: bool,
},
Set {
base: Box<TypeRef>,
bound: Option<Bound>,
},
List {
base: Box<TypeRef>,
bound: Option<Bound>,
unique: bool,
},
}
Variants
SimpleType(SimpleType)
Named
Fields
name: String
scope: Scope
Scope where the named type is declared
is_simple: bool
True if the underlying type of named type is a simple type:
TYPE a = INTEGER; ENDTYPE;
TYPE b = a; ENDTYPE;
Then both a
and b
are simple.
is_enumerate: bool
Enumeration, declared by TYPE a = ENUMERATION OF (..); END_TYPE;
.
Entity
Set
List
Implementations
sourceimpl TypeRef
impl TypeRef
sourcepub fn is_simple(&self) -> bool
pub fn is_simple(&self) -> bool
Returns true
iff self
is:
- a simple type,
- a named type whose underlying type is simple, or,
- a set or list of a type
x
such thatx.is_simple() == true
.
pub fn from_path(
ns: &Namespace<'_>,
ss: &Constraints,
path: &Path
) -> Result<Self, SemanticError>
Trait Implementations
sourceimpl Legalize for TypeRef
impl Legalize for TypeRef
fn legalize(
ns: &Namespace<'_>,
ss: &Constraints,
scope: &Scope,
ty: &Type
) -> Result<Self, SemanticError>
sourceimpl ToTokens for TypeRef
impl ToTokens for TypeRef
sourcefn to_tokens(&self, tokens: &mut TokenStream)
fn to_tokens(&self, tokens: &mut TokenStream)
Write self
to the given TokenStream
. Read more
sourcefn to_token_stream(&self) -> TokenStream
fn to_token_stream(&self) -> TokenStream
Convert self
directly into a TokenStream
object. Read more
sourcefn into_token_stream(self) -> TokenStream
fn into_token_stream(self) -> TokenStream
Convert self
directly into a TokenStream
object. Read more
impl Eq for TypeRef
impl StructuralEq for TypeRef
impl StructuralPartialEq for TypeRef
Auto Trait Implementations
impl RefUnwindSafe for TypeRef
impl Send for TypeRef
impl Sync for TypeRef
impl Unpin for TypeRef
impl UnwindSafe for TypeRef
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Spanned for T where
T: Spanned + ?Sized,
impl<T> Spanned for T where
T: Spanned + ?Sized,
sourcefn span(&self) -> Span
fn span(&self) -> Span
Returns a Span
covering the complete contents of this syntax tree
node, or Span::call_site()
if this node is empty. Read more