pub struct TypeParameters<'a>(/* private fields */);
Implementations§
Source§impl<'a> TypeParameters<'a>
impl<'a> TypeParameters<'a>
pub fn iter(&self) -> TypeParametersIter<'a> ⓘ
pub fn get(&self, index: usize) -> Option<&Type<'a>>
Sourcepub unsafe fn get_unchecked(&self, index: usize) -> &Type<'a>
pub unsafe fn get_unchecked(&self, index: usize) -> &Type<'a>
Get a type parameter at the specified index without bounds checking.
§Safety
The caller must ensure that index
is less than self.len()
.
Calling this method with an out-of-bounds index is undefined behavior.
Trait Implementations§
Source§impl<'a> Clone for TypeParameters<'a>
impl<'a> Clone for TypeParameters<'a>
Source§fn clone(&self) -> TypeParameters<'a>
fn clone(&self) -> TypeParameters<'a>
Returns a duplicate 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<'a> ExternType for TypeParameters<'a>
impl<'a> ExternType for TypeParameters<'a>
Source§impl<'a> Index<usize> for TypeParameters<'a>
impl<'a> Index<usize> for TypeParameters<'a>
Source§impl<'a> IntoIterator for TypeParameters<'a>
impl<'a> IntoIterator for TypeParameters<'a>
impl<'a> Copy for TypeParameters<'a>
Auto Trait Implementations§
impl<'a> Freeze for TypeParameters<'a>
impl<'a> RefUnwindSafe for TypeParameters<'a>
impl<'a> Send for TypeParameters<'a>
impl<'a> Sync for TypeParameters<'a>
impl<'a> Unpin for TypeParameters<'a>
impl<'a> UnwindSafe for TypeParameters<'a>
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