pub struct Redundant {
pub arm: usize,
pub node: usize,
}Expand description
A redundant or-pattern alternative: in arm arm, the alternative whose
root is node node of the arm’s pattern, by
preorder index.
§Examples
use match_lang::Redundant;
let r = Redundant { arm: 2, node: 5 };
assert_eq!((r.arm, r.node), (2, 5));Fields§
§arm: usizeThe index of the arm.
node: usizeThe preorder index of the alternative within the arm’s pattern.
Trait Implementations§
impl Copy for Redundant
impl Eq for Redundant
Source§impl Ord for Redundant
impl Ord for Redundant
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for Redundant
impl PartialOrd for Redundant
impl StructuralPartialEq for Redundant
Auto Trait Implementations§
impl Freeze for Redundant
impl RefUnwindSafe for Redundant
impl Send for Redundant
impl Sync for Redundant
impl Unpin for Redundant
impl UnsafeUnpin for Redundant
impl UnwindSafe for Redundant
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