pub enum Infix<LHS, Operator, RHS> {
Found {
lhs: LHS,
operator: Operator,
rhs: RHS,
},
None(LHS),
}
Expand description
Infix operator used to create an infix
operation, e.g. 1+1
. This helper is useful
because it does not discard the LHS
result
but rather returns it as a None
value if the
Operator
cannot be found.
Variants§
Trait Implementations§
Auto Trait Implementations§
impl<LHS, Operator, RHS> Freeze for Infix<LHS, Operator, RHS>
impl<LHS, Operator, RHS> RefUnwindSafe for Infix<LHS, Operator, RHS>
impl<LHS, Operator, RHS> Send for Infix<LHS, Operator, RHS>
impl<LHS, Operator, RHS> Sync for Infix<LHS, Operator, RHS>
impl<LHS, Operator, RHS> Unpin for Infix<LHS, Operator, RHS>
impl<LHS, Operator, RHS> UnwindSafe for Infix<LHS, Operator, RHS>
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