pub struct TypeConstructor {
pub name: Name,
pub type_parameters: Vec<Type>,
pub tpe: QualName,
}Fields§
§name: NameConstructor name. eg. in type A = B, the name is B
type_parameters: Vec<Type>The types of the parameters
tpe: QualNameThe type’s name once constructed, qualified by the package and module that
declared it — Widget.Size for a type Size = … written in Widget.
Qualified for the same reason Type::Type’s head is (AST-4): a
constructor travels into every module that imports it, and the type it
builds has to stay the declaring module’s type there. The Type this
field is turned into at a use site — Expression::from_parser’s
TypeConstructor arm — is built straight out of it, so the two agree by
construction.
Trait Implementations§
Source§impl Clone for TypeConstructor
impl Clone for TypeConstructor
Source§fn clone(&self) -> TypeConstructor
fn clone(&self) -> TypeConstructor
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 TypeConstructor
impl Debug for TypeConstructor
Source§impl PartialEq for TypeConstructor
impl PartialEq for TypeConstructor
impl StructuralPartialEq for TypeConstructor
Auto Trait Implementations§
impl Freeze for TypeConstructor
impl RefUnwindSafe for TypeConstructor
impl Send for TypeConstructor
impl Sync for TypeConstructor
impl Unpin for TypeConstructor
impl UnsafeUnpin for TypeConstructor
impl UnwindSafe for TypeConstructor
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