Enum rustc_hir::hir::MaybeOwner
source · pub enum MaybeOwner<T> {
Owner(T),
NonOwner(HirId),
Phantom,
}
Variants§
Implementations§
Trait Implementations§
source§impl<T: Clone> Clone for MaybeOwner<T>
impl<T: Clone> Clone for MaybeOwner<T>
source§fn clone(&self) -> MaybeOwner<T>
fn clone(&self) -> MaybeOwner<T>
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<T: Debug> Debug for MaybeOwner<T>
impl<T: Debug> Debug for MaybeOwner<T>
source§impl<T, __CTX> HashStable<__CTX> for MaybeOwner<T>where
__CTX: HashStableContext,
T: HashStable<__CTX>,
impl<T, __CTX> HashStable<__CTX> for MaybeOwner<T>where
__CTX: HashStableContext,
T: HashStable<__CTX>,
fn hash_stable(&self, __hcx: &mut __CTX, __hasher: &mut StableHasher)
impl<T: Copy> Copy for MaybeOwner<T>
Auto Trait Implementations§
impl<T> RefUnwindSafe for MaybeOwner<T>where
T: RefUnwindSafe,
impl<T> Send for MaybeOwner<T>where
T: Send,
impl<T> Sync for MaybeOwner<T>where
T: Sync,
impl<T> Unpin for MaybeOwner<T>where
T: Unpin,
impl<T> UnwindSafe for MaybeOwner<T>where
T: UnwindSafe,
Blanket Implementations§
source§impl<'tcx, T> ArenaAllocatable<'tcx, IsCopy> for Twhere
T: Copy,
impl<'tcx, T> ArenaAllocatable<'tcx, IsCopy> for Twhere
T: Copy,
fn allocate_on<'a>(self, arena: &'a Arena<'tcx>) -> &'a mut T
fn allocate_from_iter<'a>(
arena: &'a Arena<'tcx>,
iter: impl IntoIterator<Item = T>
) -> &'a mut [T] ⓘ
Layout§
Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.