pub enum Type {
Primitive(PrimitiveType),
Class(ClassType),
Array(ArrayType),
TypeVariable(TypeVariable),
Wildcard(WildcardType),
Error,
}Variants§
Primitive(PrimitiveType)
Class(ClassType)
Array(ArrayType)
TypeVariable(TypeVariable)
Wildcard(WildcardType)
Error
Implementations§
Source§impl Type
impl Type
pub fn primitive(primitive: PrimitiveType) -> Self
pub fn class(class: ClassType) -> Self
pub fn array(element_type: TypeId) -> Self
pub fn type_variable(name: SharedString) -> Self
pub fn wildcard(bound: Option<WildcardBound>) -> Self
pub fn error() -> Self
pub fn is_primitive(&self) -> bool
pub fn is_class(&self) -> bool
pub fn is_array(&self) -> bool
pub fn is_type_variable(&self) -> bool
pub fn is_wildcard(&self) -> bool
pub fn is_error(&self) -> bool
Trait Implementations§
impl StructuralPartialEq for Type
Auto Trait Implementations§
impl Freeze for Type
impl RefUnwindSafe for Type
impl Send for Type
impl Sync for Type
impl Unpin for Type
impl UnsafeUnpin for Type
impl UnwindSafe for Type
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