pub enum OneOrBoth<L, R> {
Left(L),
Both(L, R),
Right(R),
}
Expand description
A struct indicating either A or B or Both, but not neither - at least one must be present Useful when indicating support for Le or BrEdr, where dual mode is also supported but we require at least one. This avoids extra error checking that would be required if two options were used.
Variants§
Implementations§
Trait Implementations§
impl<L, R> StructuralPartialEq for OneOrBoth<L, R>
Auto Trait Implementations§
impl<L, R> Freeze for OneOrBoth<L, R>
impl<L, R> RefUnwindSafe for OneOrBoth<L, R>where
L: RefUnwindSafe,
R: RefUnwindSafe,
impl<L, R> Send for OneOrBoth<L, R>
impl<L, R> Sync for OneOrBoth<L, R>
impl<L, R> Unpin for OneOrBoth<L, R>
impl<L, R> UnwindSafe for OneOrBoth<L, R>where
L: UnwindSafe,
R: 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)