Struct rustc_middle::ty::context::Interned[][src]

struct Interned<'tcx, T: ?Sized>(&'tcx T);
Expand description

An entry in an interner.

Trait Implementations

impl<'tcx, T> Borrow<[T]> for Interned<'tcx, List<T>>[src]

fn borrow<'a>(&'a self) -> &'a [T]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
[src]

Immutably borrows from an owned value. Read more

impl<'tcx> Borrow<Allocation<(), ()>> for Interned<'tcx, Allocation>[src]

fn borrow<'a>(&'a self) -> &'a Allocation[src]

Immutably borrows from an owned value. Read more

impl<'tcx> Borrow<Binder<'tcx, PredicateKind<'tcx>>> for Interned<'tcx, PredicateInner<'tcx>>[src]

fn borrow<'a>(&'a self) -> &'a Binder<'tcx, PredicateKind<'tcx>>[src]

Immutably borrows from an owned value. Read more

impl<'tcx> Borrow<Const<'tcx>> for Interned<'tcx, Const<'tcx>>[src]

fn borrow<'a>(&'a self) -> &'a Const<'tcx>[src]

Immutably borrows from an owned value. Read more

impl<'tcx> Borrow<RegionKind> for Interned<'tcx, RegionKind>[src]

fn borrow(&self) -> &RegionKind[src]

Immutably borrows from an owned value. Read more

impl<'tcx> Borrow<TyKind<'tcx>> for Interned<'tcx, TyS<'tcx>>[src]

fn borrow<'a>(&'a self) -> &'a TyKind<'tcx>[src]

Immutably borrows from an owned value. Read more

impl<'tcx, T: 'tcx + ?Sized> Clone for Interned<'tcx, T>[src]

fn clone(&self) -> Self[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl<'tcx> Hash for Interned<'tcx, TyS<'tcx>>[src]

fn hash<H: Hasher>(&self, s: &mut H)[src]

Feeds this value into the given Hasher. Read more

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given Hasher. Read more

impl<'tcx> Hash for Interned<'tcx, PredicateInner<'tcx>>[src]

fn hash<H: Hasher>(&self, s: &mut H)[src]

Feeds this value into the given Hasher. Read more

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given Hasher. Read more

impl<'tcx, T: Hash> Hash for Interned<'tcx, List<T>>[src]

fn hash<H: Hasher>(&self, s: &mut H)[src]

Feeds this value into the given Hasher. Read more

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given Hasher. Read more

impl<'tcx> Hash for Interned<'tcx, Allocation>[src]

fn hash<H: Hasher>(&self, s: &mut H)[src]

Feeds this value into the given Hasher. Read more

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given Hasher. Read more

impl<'tcx> Hash for Interned<'tcx, RegionKind>[src]

fn hash<H: Hasher>(&self, s: &mut H)[src]

Feeds this value into the given Hasher. Read more

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given Hasher. Read more

impl<'tcx> Hash for Interned<'tcx, Const<'tcx>>[src]

fn hash<H: Hasher>(&self, s: &mut H)[src]

Feeds this value into the given Hasher. Read more

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given Hasher. Read more

impl<'tcx, T: 'tcx + ?Sized> IntoPointer for Interned<'tcx, T>[src]

fn into_pointer(&self) -> *const ()[src]

Returns a pointer which outlives self.

impl<'tcx> PartialEq<Interned<'tcx, Allocation<(), ()>>> for Interned<'tcx, Allocation>[src]

fn eq(&self, other: &Self) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl<'tcx> PartialEq<Interned<'tcx, Const<'tcx>>> for Interned<'tcx, Const<'tcx>>[src]

fn eq(&self, other: &Self) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl<'tcx, T: PartialEq> PartialEq<Interned<'tcx, List<T>>> for Interned<'tcx, List<T>>[src]

fn eq(&self, other: &Interned<'tcx, List<T>>) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl<'tcx> PartialEq<Interned<'tcx, PredicateInner<'tcx>>> for Interned<'tcx, PredicateInner<'tcx>>[src]

fn eq(&self, other: &Interned<'tcx, PredicateInner<'tcx>>) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl<'tcx> PartialEq<Interned<'tcx, RegionKind>> for Interned<'tcx, RegionKind>[src]

fn eq(&self, other: &Self) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl<'tcx> PartialEq<Interned<'tcx, TyS<'tcx>>> for Interned<'tcx, TyS<'tcx>>[src]

fn eq(&self, other: &Interned<'tcx, TyS<'tcx>>) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl<'tcx, T: 'tcx + ?Sized> Copy for Interned<'tcx, T>[src]

impl<'tcx> Eq for Interned<'tcx, TyS<'tcx>>[src]

impl<'tcx> Eq for Interned<'tcx, PredicateInner<'tcx>>[src]

impl<'tcx, T: Eq> Eq for Interned<'tcx, List<T>>[src]

impl<'tcx> Eq for Interned<'tcx, Allocation>[src]

impl<'tcx> Eq for Interned<'tcx, RegionKind>[src]

impl<'tcx> Eq for Interned<'tcx, Const<'tcx>>[src]

Auto Trait Implementations

impl<'tcx, T: ?Sized> RefUnwindSafe for Interned<'tcx, T> where
    T: RefUnwindSafe

impl<'tcx, T: ?Sized> Send for Interned<'tcx, T> where
    T: Sync

impl<'tcx, T: ?Sized> Sync for Interned<'tcx, T> where
    T: Sync

impl<'tcx, T: ?Sized> Unpin for Interned<'tcx, T>

impl<'tcx, T: ?Sized> UnwindSafe for Interned<'tcx, T> where
    T: RefUnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<'tcx, T> ArenaAllocatable<'tcx, ()> for T where
    T: Copy
[src]

pub fn allocate_on(Self, &'a Arena<'tcx>) -> &'a mut T[src]

pub fn allocate_from_iter(
    &'a Arena<'tcx>,
    impl IntoIterator<Item = T>
) -> &'a mut [T]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> MaybeResult<T> for T[src]

type Error = !

pub fn from(Result<T, <T as MaybeResult<T>>::Error>) -> T[src]

pub fn to_result(self) -> Result<T, <T as MaybeResult<T>>::Error>[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

impl<T> WithConstness for T[src]

fn with_constness(self, constness: Constness) -> ConstnessAnd<Self>[src]

fn with_const(self) -> ConstnessAnd<Self>[src]

fn without_const(self) -> ConstnessAnd<Self>[src]

impl<'a, T> Captures<'a> for T where
    T: ?Sized
[src]