Enum erg_compiler::ty::ParamTy
source · [−]pub enum ParamTy {
Pos {
name: Option<Str>,
ty: Type,
},
Kw {
name: Str,
ty: Type,
},
KwWithDefault {
name: Str,
ty: Type,
default: Type,
},
}
Variants
Pos
Kw
KwWithDefault
Implementations
sourceimpl ParamTy
impl ParamTy
pub const fn pos(name: Option<Str>, ty: Type) -> Self
pub const fn kw(name: Str, ty: Type) -> Self
pub const fn kw_default(name: Str, ty: Type, default: Type) -> Self
pub const fn anonymous(ty: Type) -> Self
pub fn name(&self) -> Option<&Str>
pub const fn typ(&self) -> &Type
pub fn typ_mut(&mut self) -> &mut Type
pub fn deconstruct(self) -> (Option<Str>, Type, Option<Type>)
Trait Implementations
impl Eq for ParamTy
impl StructuralEq for ParamTy
impl StructuralPartialEq for ParamTy
Auto Trait Implementations
impl !RefUnwindSafe for ParamTy
impl !Send for ParamTy
impl !Sync for ParamTy
impl Unpin for ParamTy
impl !UnwindSafe for ParamTy
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