pub enum Ty {
Imported(PathBuf, Identifier, Identifier),
Simple(Identifier),
Complex(Identifier, Vec<TyExpr>),
}
Expand description
A type expression.
This can be used either to indicate the class’s parent’s type or a field’s type.
Variants§
Imported(PathBuf, Identifier, Identifier)
An imported type.
Simple(Identifier)
A simple type without arguments.
Complex(Identifier, Vec<TyExpr>)
A complex type with arguments (possibly zero, like in an empty Union
).
Implementations§
Source§impl Ty
impl Ty
Sourcepub fn base_name(&self) -> &Identifier
pub fn base_name(&self) -> &Identifier
The base name of the type, without any arguments.
Sourcepub fn iter_idents(&self) -> impl Iterator<Item = &Identifier>
pub fn iter_idents(&self) -> impl Iterator<Item = &Identifier>
Iterate over all the identifiers in the type.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Ty
impl RefUnwindSafe for Ty
impl Send for Ty
impl Sync for Ty
impl Unpin for Ty
impl UnwindSafe for Ty
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