Enum rustc_mir::hair::pattern::_match::Constructor [−][src]
pub enum Constructor<'tcx> {
Single,
Variant(DefId),
ConstantValue(&'tcx Const<'tcx>),
ConstantRange(&'tcx Const<'tcx>, &'tcx Const<'tcx>, RangeEnd),
Slice(u64),
}🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Variants
Single🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
The constructor of all patterns that don't vary by constructor, e.g. struct patterns and fixed-length arrays.
Variant(DefId)🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Enum variants.
ConstantValue(&'tcx Const<'tcx>)🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Literal values.
ConstantRange(&'tcx Const<'tcx>, &'tcx Const<'tcx>, RangeEnd)🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Ranges of literal values (2...5 and 2..5).
Slice(u64)🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Array patterns of length n.
Methods
impl<'tcx> Constructor<'tcx>[src]
impl<'tcx> Constructor<'tcx>fn variant_index_for_adt(&self, adt: &'tcx AdtDef) -> usize[src]
fn variant_index_for_adt(&self, adt: &'tcx AdtDef) -> usize🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Trait Implementations
impl<'tcx> Clone for Constructor<'tcx>[src]
impl<'tcx> Clone for Constructor<'tcx>fn clone(&self) -> Constructor<'tcx>[src]
fn clone(&self) -> Constructor<'tcx>Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl<'tcx> Debug for Constructor<'tcx>[src]
impl<'tcx> Debug for Constructor<'tcx>fn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl<'tcx> PartialEq for Constructor<'tcx>[src]
impl<'tcx> PartialEq for Constructor<'tcx>fn eq(&self, other: &Constructor<'tcx>) -> bool[src]
fn eq(&self, other: &Constructor<'tcx>) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &Constructor<'tcx>) -> bool[src]
fn ne(&self, other: &Constructor<'tcx>) -> boolThis method tests for !=.
Auto Trait Implementations
impl<'tcx> !Send for Constructor<'tcx>
impl<'tcx> !Send for Constructor<'tcx>impl<'tcx> !Sync for Constructor<'tcx>
impl<'tcx> !Sync for Constructor<'tcx>