Struct rustc_mir_build::thir::pattern::deconstruct_pat::Slice
source · pub(super) struct Slice {
array_len: Option<usize>,
kind: SliceKind,
}
Expand description
A constructor for array and slice patterns.
Fields§
§array_len: Option<usize>
None
if the matched value is a slice, Some(n)
if it is an array of size n
.
kind: SliceKind
The kind of pattern it is: fixed-length [x, y]
or variable length [x, .., y]
.
Implementations§
Trait Implementations§
source§impl PartialEq<Slice> for Slice
impl PartialEq<Slice> for Slice
impl Copy for Slice
impl Eq for Slice
impl StructuralEq for Slice
impl StructuralPartialEq for Slice
Auto Trait Implementations§
impl RefUnwindSafe for Slice
impl Send for Slice
impl Sync for Slice
impl Unpin for Slice
impl UnwindSafe for Slice
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
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: 40 bytes