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>
impl<'a> Move for ImplView<'a>
impl<'a> RefUnwindSafe for ImplView<'a>
impl<'a> Send for ImplView<'a>
impl<'a> Sync for ImplView<'a>
impl<'a> Unpin for ImplView<'a>
impl<'a> UnsafeUnpin for ImplView<'a>
impl<'a> UnwindSafe for ImplView<'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