pub struct ImplView<'a> { /* private fields */ }Expand description
Zero-copy view of a decoded ImplEntry paired with its shard TyArena and assoc_tys table.
Implementations§
Source§impl<'a> ImplView<'a>
impl<'a> ImplView<'a>
pub fn new( index: u32, raw: ImplEntry, arena: TyArenaView<'a>, all_assoc_tys: &'a [AssocTyEntry], ) -> Self
pub const fn index(&self) -> u32
pub const fn def_index(&self) -> Option<u32>
pub const fn self_ty(&self) -> TyId
pub const fn simplified_self(&self) -> SimplifiedSelfKind
pub const fn trait_def(&self) -> Option<TyDefId>
pub fn trait_args(&self) -> GenericArgIter<'a> ⓘ
pub fn assoc_tys(&self) -> AssocTyIter<'a> ⓘ
Sourcepub fn find_assoc_ty(&self, name: &str) -> Option<TyId>
pub fn find_assoc_ty(&self, name: &str) -> Option<TyId>
Finds the RHS TyId of an associated type binding by name (e.g. "Item", "Target").
pub fn assoc_def_indices(&self) -> U32ListIter<'a> ⓘ
pub const fn flags(&self) -> u8
pub const fn is_trait(&self) -> bool
pub const fn is_inherent(&self) -> bool
pub const fn is_negative(&self) -> bool
pub const fn is_unsafe(&self) -> bool
pub const fn is_reservation(&self) -> bool
pub const fn is_const(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl<'a> Forget for ImplView<'a>
impl<'a> Freeze for ImplView<'a>where
&'a [u8]: Freeze,
&'a [TyDefEntry]: Freeze,
&'a [TyEntry]: Freeze,
&'a [TyBoundEntry]: Freeze,
&'a [u32]: Freeze,
&'a [AssocTyEntry]: Freeze,
impl<'a> Move for ImplView<'a>
impl<'a> RefUnwindSafe for ImplView<'a>
impl<'a> Send for ImplView<'a>where
&'a [u8]: Send,
&'a [TyDefEntry]: Send,
&'a [TyEntry]: Send,
&'a [TyBoundEntry]: Send,
&'a [u32]: Send,
&'a [AssocTyEntry]: Send,
impl<'a> Sync for ImplView<'a>
impl<'a> Unpin for ImplView<'a>where
&'a [u8]: Unpin,
&'a [TyDefEntry]: Unpin,
&'a [TyEntry]: Unpin,
&'a [TyBoundEntry]: Unpin,
&'a [u32]: Unpin,
&'a [AssocTyEntry]: Unpin,
impl<'a> UnsafeUnpin for ImplView<'a>where
&'a [u8]: UnsafeUnpin,
&'a [TyDefEntry]: UnsafeUnpin,
&'a [TyEntry]: UnsafeUnpin,
&'a [TyBoundEntry]: UnsafeUnpin,
&'a [u32]: UnsafeUnpin,
&'a [AssocTyEntry]: UnsafeUnpin,
impl<'a> UnwindSafe for ImplView<'a>where
&'a [u8]: UnwindSafe,
&'a [TyDefEntry]: UnwindSafe,
&'a [TyEntry]: UnwindSafe,
&'a [TyBoundEntry]: UnwindSafe,
&'a [u32]: UnwindSafe,
&'a [AssocTyEntry]: UnwindSafe,
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