pub enum TypeParam {
TypeVar(TypeParamTypeVar),
TypeVarTuple(TypeParamTypeVarTuple),
ParamSpec(TypeParamParamSpec),
}Expand description
See also type_param
Variants§
Implementations§
Source§impl TypeParam
impl TypeParam
pub const fn is_type_var(&self) -> bool
pub fn type_var(self) -> Option<TypeParamTypeVar>
pub fn expect_type_var(self) -> TypeParamTypeVar
pub fn as_type_var_mut(&mut self) -> Option<&mut TypeParamTypeVar>
pub fn as_type_var(&self) -> Option<&TypeParamTypeVar>
pub const fn is_type_var_tuple(&self) -> bool
pub fn type_var_tuple(self) -> Option<TypeParamTypeVarTuple>
pub fn expect_type_var_tuple(self) -> TypeParamTypeVarTuple
pub fn as_type_var_tuple_mut(&mut self) -> Option<&mut TypeParamTypeVarTuple>
pub fn as_type_var_tuple(&self) -> Option<&TypeParamTypeVarTuple>
pub const fn is_param_spec(&self) -> bool
pub fn param_spec(self) -> Option<TypeParamParamSpec>
pub fn expect_param_spec(self) -> TypeParamParamSpec
pub fn as_param_spec_mut(&mut self) -> Option<&mut TypeParamParamSpec>
pub fn as_param_spec(&self) -> Option<&TypeParamParamSpec>
Trait Implementations§
Source§impl<'a> From<&'a TypeParam> for AnyNodeRef<'a>
impl<'a> From<&'a TypeParam> for AnyNodeRef<'a>
Source§fn from(node: &'a TypeParam) -> AnyNodeRef<'a>
fn from(node: &'a TypeParam) -> AnyNodeRef<'a>
Converts to this type from the input type.
Source§impl<'a> From<&'a TypeParam> for AnyRootNodeRef<'a>
impl<'a> From<&'a TypeParam> for AnyRootNodeRef<'a>
Source§fn from(node: &'a TypeParam) -> AnyRootNodeRef<'a>
fn from(node: &'a TypeParam) -> AnyRootNodeRef<'a>
Converts to this type from the input type.
Source§impl<'a> From<&'a TypeParam> for ComparableTypeParam<'a>
impl<'a> From<&'a TypeParam> for ComparableTypeParam<'a>
Source§impl<'a> From<&'a TypeParam> for TypeParamRef<'a>
impl<'a> From<&'a TypeParam> for TypeParamRef<'a>
Source§impl From<TypeParamParamSpec> for TypeParam
impl From<TypeParamParamSpec> for TypeParam
Source§fn from(node: TypeParamParamSpec) -> Self
fn from(node: TypeParamParamSpec) -> Self
Converts to this type from the input type.
Source§impl From<TypeParamTypeVar> for TypeParam
impl From<TypeParamTypeVar> for TypeParam
Source§fn from(node: TypeParamTypeVar) -> Self
fn from(node: TypeParamTypeVar) -> Self
Converts to this type from the input type.
Source§impl From<TypeParamTypeVarTuple> for TypeParam
impl From<TypeParamTypeVarTuple> for TypeParam
Source§fn from(node: TypeParamTypeVarTuple) -> Self
fn from(node: TypeParamTypeVarTuple) -> Self
Converts to this type from the input type.
Source§impl HasNodeIndex for TypeParam
impl HasNodeIndex for TypeParam
Source§fn node_index(&self) -> &AtomicNodeIndex
fn node_index(&self) -> &AtomicNodeIndex
Returns the
AtomicNodeIndex for this node.Source§impl<'a> TryFrom<AnyRootNodeRef<'a>> for &'a TypeParam
impl<'a> TryFrom<AnyRootNodeRef<'a>> for &'a TypeParam
impl StructuralPartialEq for TypeParam
Auto Trait Implementations§
impl !Freeze for TypeParam
impl RefUnwindSafe for TypeParam
impl Send for TypeParam
impl Sync for TypeParam
impl Unpin for TypeParam
impl UnsafeUnpin for TypeParam
impl UnwindSafe for TypeParam
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more