pub enum Xor<const A: bool, const B: bool> {}Expand description
Matches exclusive-or booleans.
#![feature(generic_const_exprs)]
use checks::{ Passed, bool::* };
struct XorTest<const A: bool, const B: bool>
where
Xor<A, B>: Passed;
let works = XorTest::<true, false>; // Success!
let works = XorTest::<false, true>; // Success!ⓘ
let doesnt_work = XorTest::<true, true>; // Compile error!
let doesnt_work = XorTest::<false, false>; // Compile error!Implementations§
Trait Implementations§
impl<const A: bool, const B: bool> Conclusion<{ $name::<$($param),*>::simplify() }> for Xor<A, B>
Auto Trait Implementations§
impl<const A: bool, const B: bool> Freeze for Xor<A, B>
impl<const A: bool, const B: bool> RefUnwindSafe for Xor<A, B>
impl<const A: bool, const B: bool> Send for Xor<A, B>
impl<const A: bool, const B: bool> Sync for Xor<A, B>
impl<const A: bool, const B: bool> Unpin for Xor<A, B>
impl<const A: bool, const B: bool> UnwindSafe for Xor<A, B>
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