[−][src]Enum rustc_mir_build::thir::pattern::_match::SliceKind

pub(in thir::pattern::_match) enum SliceKind {
    FixedLen(u64),
    VarLen(u64, u64),
}

Variants

FixedLen(u64)

Patterns of length n ([x, y]).

VarLen(u64, u64)

Patterns using the .. notation ([x, .., y]). Captures any array constructor of length >= i + j. In the case where array_len is Some(_), this indicates that we only care about the first i and the last j values of the array, and everything in between is a wildcard _.

Implementations

impl SliceKind[src]

pub(in thir::pattern::_match) fn arity(
    self
) -> u64
[src]

pub(in thir::pattern::_match) fn covers_length(
    self,
    other_len: u64
) -> bool
[src]

Whether this pattern includes patterns of length other_len.

Trait Implementations

impl Clone for SliceKind[src]

impl Copy for SliceKind[src]

impl Debug for SliceKind[src]

impl Eq for SliceKind[src]

impl PartialEq<SliceKind> for SliceKind[src]

impl StructuralEq for SliceKind[src]

impl StructuralPartialEq for SliceKind[src]

Auto Trait Implementations

impl RefUnwindSafe for SliceKind

impl Send for SliceKind

impl Sync for SliceKind

impl Unpin for SliceKind

impl UnwindSafe for SliceKind

Blanket Implementations

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

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

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

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

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

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

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

type Owned = T

The resulting type after obtaining ownership.

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.

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.