Enum rustc_hir::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
sourceimpl<T> MaybeOwner<T>
impl<T> MaybeOwner<T>
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 more
sourceimpl<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<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. 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.