Enum rustc_hir::MaybeOwner
source · pub enum MaybeOwner<T> {
Owner(T),
NonOwner(HirId),
Phantom,
}
Variants
Owner(T)
NonOwner(HirId)
Phantom
Used as a placeholder for unused LocalDefId.
Implementations
Trait Implementations
sourceimpl<T: Clone> Clone for MaybeOwner<T>
impl<T: Clone> Clone for MaybeOwner<T>
sourcefn clone(&self) -> MaybeOwner<T>
fn clone(&self) -> MaybeOwner<T>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl<T: Debug> Debug for MaybeOwner<T>
impl<T: Debug> Debug for MaybeOwner<T>
sourceimpl<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
sourceimpl<'tcx, T> ArenaAllocatable<'tcx, IsCopy> for Twhere
T: Copy,
impl<'tcx, T> ArenaAllocatable<'tcx, IsCopy> for Twhere
T: Copy,
fn allocate_on(self, arena: &'a Arena<'tcx>) -> &'a mut T
fn allocate_from_iter(
arena: &'a Arena<'tcx>,
iter: impl IntoIterator<Item = T>
) -> &'a mut [T]ⓘNotable traits for &[u8]impl Read for &[u8]impl Write for &mut [u8]
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
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.