pub enum TypeDeclaration {
Alias {
source_name: String,
name: String,
type_params: Vec<String>,
value: TypeExpr,
doc: Option<String>,
},
Opaque {
source_name: String,
name: String,
type_params: Vec<String>,
doc: Option<String>,
},
Custom {
source_name: String,
name: String,
type_params: Vec<String>,
constructors: Vec<Constructor>,
doc: Option<String>,
},
Incomplete {
source_name: String,
name: String,
type_params: Vec<String>,
incompleteness: IncompletenessKind,
partial_type: Option<TypeExpr>,
doc: Option<String>,
},
}Expand description
A public type declaration or specification.
Variants§
Alias
A transparent type alias.
Fields
Opaque
An opaque type specification without a visible representation.
Fields
Custom
An algebraic custom type.
Fields
§
constructors: Vec<Constructor>Public constructors.
Incomplete
A v4 declaration whose definition is incomplete.
Fields
§
incompleteness: IncompletenessKindKind of incompleteness reported by the IR.
Implementations§
Trait Implementations§
Source§impl Clone for TypeDeclaration
impl Clone for TypeDeclaration
Source§impl Debug for TypeDeclaration
impl Debug for TypeDeclaration
impl Eq for TypeDeclaration
Source§impl PartialEq for TypeDeclaration
impl PartialEq for TypeDeclaration
Source§impl Serialize for TypeDeclaration
impl Serialize for TypeDeclaration
impl StructuralPartialEq for TypeDeclaration
Auto Trait Implementations§
impl Freeze for TypeDeclaration
impl RefUnwindSafe for TypeDeclaration
impl Send for TypeDeclaration
impl Sync for TypeDeclaration
impl Unpin for TypeDeclaration
impl UnsafeUnpin for TypeDeclaration
impl UnwindSafe for TypeDeclaration
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.