pub struct TransItemSource<'tcx> {
pub item: RustcItem<'tcx>,
}Expand description
The id of an untranslated item.
Fields§
§item: RustcItem<'tcx>Implementations§
Source§impl<'tcx> TransItemSource<'tcx>
impl<'tcx> TransItemSource<'tcx>
pub fn new(item: RustcItem<'tcx>) -> Self
Sourcepub fn from_item(item: &ItemRef<'tcx>, monomorphize: bool) -> Self
pub fn from_item(item: &ItemRef<'tcx>, monomorphize: bool) -> Self
Refers to the given item. Depending on monomorphize, this chooses between the monomorphic
and polymorphic versions of the item.
Sourcepub fn polymorphic(def_id: &DefId) -> Self
pub fn polymorphic(def_id: &DefId) -> Self
Refers to the polymorphic version of this item.
Sourcepub fn monomorphic(item: &ItemRef<'tcx>) -> Self
pub fn monomorphic(item: &ItemRef<'tcx>) -> Self
Refers to the monomorphic version of this item.
Sourcepub fn monomorphic_trait(def_id: &DefId) -> Self
pub fn monomorphic_trait(def_id: &DefId) -> Self
Refers to the monomorphic trait (or vtable).
See the docs of RustcItem::MonoTrait for details.
pub fn def_id(&self) -> &DefId
pub fn kind(&self) -> ItemOrModuleKind
pub fn is_translatable(def_id: &DefId) -> bool
pub fn is_for_trait(def_id: &DefId) -> bool
Sourcepub(crate) fn naming_parent(&self, s: &impl BaseState<'tcx>) -> Option<Self>
pub(crate) fn naming_parent(&self, s: &impl BaseState<'tcx>) -> Option<Self>
For virtual items that have a parent (typically a method impl), return this parent. Does not attempt to generally compute the parent of an item. Used to compute names.
Sourcepub(crate) fn use_base_attr_info(&self) -> bool
pub(crate) fn use_base_attr_info(&self) -> bool
Whether this item keeps the attribute information of the underlying Rust DefId.
Trait Implementations§
Source§impl<'tcx> Clone for TransItemSource<'tcx>
impl<'tcx> Clone for TransItemSource<'tcx>
Source§impl<'tcx> Debug for TransItemSource<'tcx>
impl<'tcx> Debug for TransItemSource<'tcx>
impl<'tcx> Eq for TransItemSource<'tcx>
Source§impl<'tcx> Hash for TransItemSource<'tcx>
impl<'tcx> Hash for TransItemSource<'tcx>
Source§impl<'tcx> PartialEq for TransItemSource<'tcx>
impl<'tcx> PartialEq for TransItemSource<'tcx>
impl<'tcx> StructuralPartialEq for TransItemSource<'tcx>
Auto Trait Implementations§
impl<'tcx> DynSend for TransItemSource<'tcx>
impl<'tcx> DynSync for TransItemSource<'tcx>
impl<'tcx> Forget for TransItemSource<'tcx>
impl<'tcx> Freeze for TransItemSource<'tcx>
impl<'tcx> Move for TransItemSource<'tcx>
impl<'tcx> RefUnwindSafe for TransItemSource<'tcx>
impl<'tcx> Send for TransItemSource<'tcx>
impl<'tcx> Sync for TransItemSource<'tcx>
impl<'tcx> Unpin for TransItemSource<'tcx>
impl<'tcx> UnsafeUnpin for TransItemSource<'tcx>
impl<'tcx> UnwindSafe for TransItemSource<'tcx>
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,
impl<T> Dedup for T
§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> HashConsable for T
§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