rustc_middle::query::queries::defaultness

Type Alias ProvidedValue

Source
pub type ProvidedValue<'tcx> = Defaultness;
Expand description

This type alias specifies the type returned from query providers and the type used for decoding. For regular queries this is the declared returned type V, but arena_cache will use <V as Deref>::Target instead.

Aliased Type§

enum ProvidedValue<'tcx> {
    Default {
        has_value: bool,
    },
    Final,
}

Variants§

§

Default

Fields

§has_value: bool
§

Final

Layout§

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.

Size: 1 byte

Size for each variant:

  • Default: 1 byte
  • Final: 0 bytes

Implementations

Source§

impl Defaultness

Source

pub fn has_value(&self) -> bool

Source

pub fn is_final(&self) -> bool

Source

pub fn is_default(&self) -> bool

Trait Implementations

Source§

impl Clone for Defaultness

Source§

fn clone(&self) -> Defaultness

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Defaultness

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<__D> Decodable<__D> for Defaultness
where __D: SpanDecoder,

Source§

impl<__E> Encodable<__E> for Defaultness
where __E: SpanEncoder,

Source§

fn encode(&self, __encoder: &mut __E)

Source§

impl EraseType for Defaultness

Source§

type Result = [u8; 1]

Source§

impl<__CTX> HashStable<__CTX> for Defaultness
where __CTX: HashStableContext,

Source§

fn hash_stable( &self, __hcx: &mut __CTX, __hasher: &mut StableHasher<SipHasher128>, )

Source§

impl ParameterizedOverTcx for Defaultness

Source§

impl PartialEq for Defaultness

Source§

fn eq(&self, other: &Defaultness) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for Defaultness

Source§

impl Eq for Defaultness

Source§

impl StructuralPartialEq for Defaultness