#[non_exhaustive]pub enum Decision<O> {
Kept(O),
Changed(O),
Refused,
}Expand description
What the links made of the owner’s answer.
§Examples
use enshwick::points::Decision;
assert_eq!(Decision::Changed(4).value_or(0), 4);
assert_eq!(Decision::<u32>::Refused.value_or(0), 0);
assert!(Decision::<u32>::Refused.is_refused());Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Kept(O)
No link changed the answer.
Changed(O)
Links changed the answer to this.
Refused
A link refused.
Implementations§
Trait Implementations§
impl<O: Copy> Copy for Decision<O>
impl<O: Eq> Eq for Decision<O>
impl<O: PartialEq> StructuralPartialEq for Decision<O>
Auto Trait Implementations§
impl<O> Freeze for Decision<O>where
O: Freeze,
impl<O> RefUnwindSafe for Decision<O>where
O: RefUnwindSafe,
impl<O> Send for Decision<O>where
O: Send,
impl<O> Sync for Decision<O>where
O: Sync,
impl<O> Unpin for Decision<O>where
O: Unpin,
impl<O> UnsafeUnpin for Decision<O>where
O: UnsafeUnpin,
impl<O> UnwindSafe for Decision<O>where
O: UnwindSafe,
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