pub enum FormatSwitch<B, J> {
Bsatn(B),
Json(J),
}Expand description
Used whenever different formats need to coexist.
Variants§
Implementations§
Source§impl<B1, J1> FormatSwitch<B1, J1>
impl<B1, J1> FormatSwitch<B1, J1>
Sourcepub fn zip_mut<B2, J2>(
&mut self,
other: FormatSwitch<B2, J2>,
) -> FormatSwitch<(&mut B1, B2), (&mut J1, J2)>
pub fn zip_mut<B2, J2>( &mut self, other: FormatSwitch<B2, J2>, ) -> FormatSwitch<(&mut B1, B2), (&mut J1, J2)>
Zips together two switches.
Trait Implementations§
Source§impl<B, J> Clone for FormatSwitch<B, J>
impl<B, J> Clone for FormatSwitch<B, J>
Source§fn clone(&self) -> FormatSwitch<B, J>
fn clone(&self) -> FormatSwitch<B, J>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<B, J> Freeze for FormatSwitch<B, J>
impl<B, J> RefUnwindSafe for FormatSwitch<B, J>where
B: RefUnwindSafe,
J: RefUnwindSafe,
impl<B, J> Send for FormatSwitch<B, J>
impl<B, J> Sync for FormatSwitch<B, J>
impl<B, J> Unpin for FormatSwitch<B, J>
impl<B, J> UnwindSafe for FormatSwitch<B, J>where
B: UnwindSafe,
J: 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§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more