Enum erg_compiler::ty::TyBound
source · [−]pub enum TyBound {
Sandwiched {
sub: Type,
mid: Type,
sup: Type,
},
Instance {
name: Str,
t: Type,
},
}
Expand description
TyBoundはtemplateで、Constraintは自由型変数が持つinstance
Variants
Sandwiched
Sub <: Mid <: Sup
Instance
Implementations
sourceimpl TyBound
impl TyBound
pub const fn sandwiched(sub: Type, mid: Type, sup: Type) -> Self
pub const fn subtype_of(sub: Type, sup: Type) -> Self
pub const fn static_instance(name: &'static str, t: Type) -> Self
pub fn instance(name: Str, t: Type) -> Self
pub fn mentions_as_instance(&self, name: &str) -> bool
pub fn mentions_as_mid(&self, name: &str) -> bool
pub fn has_qvar(&self) -> bool
pub fn is_cachable(&self) -> bool
pub fn has_unbound_var(&self) -> bool
pub fn get_type(&self) -> &Type
pub fn get_types(&self) -> Option<(&Type, &Type, &Type)>
pub fn get_lhs(&self) -> Str
Trait Implementations
sourceimpl LimitedDisplay for TyBound
impl LimitedDisplay for TyBound
fn limited_fmt(&self, f: &mut Formatter<'_>, limit: usize) -> Result
impl Eq for TyBound
impl StructuralEq for TyBound
impl StructuralPartialEq for TyBound
Auto Trait Implementations
impl !RefUnwindSafe for TyBound
impl !Send for TyBound
impl !Sync for TyBound
impl Unpin for TyBound
impl !UnwindSafe for TyBound
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more