Enum erg_compiler::context::ClassDefType
source · pub enum ClassDefType {
Simple(Type),
ImplTrait {
class: Type,
impl_trait: Type,
},
}
Variants§
Implementations§
source§impl ClassDefType
impl ClassDefType
pub const fn impl_trait(class: Type, impl_trait: Type) -> Self
pub fn get_class(&self) -> &Type
pub fn get_impl_trait(&self) -> Option<&Type>
pub fn is_class_of(&self, t: &Type) -> bool
pub fn is_impl_of(&self, trait_: &Type) -> bool
Trait Implementations§
source§impl Clone for ClassDefType
impl Clone for ClassDefType
source§fn clone(&self) -> ClassDefType
fn clone(&self) -> ClassDefType
Returns a copy of the value. Read more
1.0.0 · 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 ClassDefType
impl Debug for ClassDefType
source§impl Display for ClassDefType
impl Display for ClassDefType
source§impl Hash for ClassDefType
impl Hash for ClassDefType
source§impl PartialEq for ClassDefType
impl PartialEq for ClassDefType
source§fn eq(&self, other: &ClassDefType) -> bool
fn eq(&self, other: &ClassDefType) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for ClassDefType
impl StructuralPartialEq for ClassDefType
Auto Trait Implementations§
impl Freeze for ClassDefType
impl RefUnwindSafe for ClassDefType
impl Send for ClassDefType
impl Sync for ClassDefType
impl Unpin for ClassDefType
impl UnwindSafe for ClassDefType
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