pub struct GenericParams {
pub types_map: TypesMap,
/* private fields */
}
Expand description
Data about the generic parameters of a function, struct, impl, etc.
Fields§
§types_map: TypesMap
Implementations§
source§impl GenericParams
impl GenericParams
pub fn len_lifetimes(&self) -> usize
pub fn len_type_or_consts(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn no_predicates(&self) -> bool
pub fn where_predicates(&self) -> Iter<'_, WherePredicate>
sourcepub fn iter_type_or_consts(
&self,
) -> impl DoubleEndedIterator<Item = (LocalTypeOrConstParamId, &TypeOrConstParamData)>
pub fn iter_type_or_consts( &self, ) -> impl DoubleEndedIterator<Item = (LocalTypeOrConstParamId, &TypeOrConstParamData)>
Iterator of type_or_consts field
sourcepub fn iter_lt(
&self,
) -> impl DoubleEndedIterator<Item = (LocalLifetimeParamId, &LifetimeParamData)>
pub fn iter_lt( &self, ) -> impl DoubleEndedIterator<Item = (LocalLifetimeParamId, &LifetimeParamData)>
Iterator of lifetimes field
pub fn find_type_by_name( &self, name: &Name, parent: GenericDefId, ) -> Option<TypeParamId>
pub fn find_const_by_name( &self, name: &Name, parent: GenericDefId, ) -> Option<ConstParamId>
pub fn trait_self_param(&self) -> Option<LocalTypeOrConstParamId>
pub fn find_lifetime_by_name( &self, name: &Name, parent: GenericDefId, ) -> Option<LifetimeParamId>
Trait Implementations§
source§impl Clone for GenericParams
impl Clone for GenericParams
source§fn clone(&self) -> GenericParams
fn clone(&self) -> GenericParams
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 GenericParams
impl Debug for GenericParams
source§impl Hash for GenericParams
impl Hash for GenericParams
source§impl Index<Idx<LifetimeParamData>> for GenericParams
impl Index<Idx<LifetimeParamData>> for GenericParams
source§type Output = LifetimeParamData
type Output = LifetimeParamData
The returned type after indexing.
source§fn index(&self, index: LocalLifetimeParamId) -> &LifetimeParamData
fn index(&self, index: LocalLifetimeParamId) -> &LifetimeParamData
Performs the indexing (
container[index]
) operation. Read moresource§impl Index<Idx<TypeOrConstParamData>> for GenericParams
impl Index<Idx<TypeOrConstParamData>> for GenericParams
source§type Output = TypeOrConstParamData
type Output = TypeOrConstParamData
The returned type after indexing.
source§fn index(&self, index: LocalTypeOrConstParamId) -> &TypeOrConstParamData
fn index(&self, index: LocalTypeOrConstParamId) -> &TypeOrConstParamData
Performs the indexing (
container[index]
) operation. Read moresource§impl PartialEq for GenericParams
impl PartialEq for GenericParams
impl Eq for GenericParams
impl StructuralPartialEq for GenericParams
Auto Trait Implementations§
impl Freeze for GenericParams
impl RefUnwindSafe for GenericParams
impl Send for GenericParams
impl Sync for GenericParams
impl Unpin for GenericParams
impl UnwindSafe for GenericParams
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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