pub enum AnyOf2<A, B> {
A(A),
B(B),
}Variants§
Implementations§
Source§impl<A, B> AnyOf2<A, B>
impl<A, B> AnyOf2<A, B>
pub fn is_a(&self) -> bool
pub fn as_a(&self) -> Option<&A>
pub fn as_a_mut(&mut self) -> Option<&mut A>
pub fn into_a(self) -> Result<A, Self>
pub fn is_b(&self) -> bool
pub fn as_b(&self) -> Option<&B>
pub fn as_b_mut(&mut self) -> Option<&mut B>
pub fn into_b(self) -> Result<B, Self>
Trait Implementations§
Source§impl<'js, A: JsLifetime<'js>, B: JsLifetime<'js>> JsLifetime<'js> for AnyOf2<A, B>
impl<'js, A: JsLifetime<'js>, B: JsLifetime<'js>> JsLifetime<'js> for AnyOf2<A, B>
Source§type Changed<'to> = AnyOf2<<A as JsLifetime<'js>>::Changed<'to>, <B as JsLifetime<'js>>::Changed<'to>>
type Changed<'to> = AnyOf2<<A as JsLifetime<'js>>::Changed<'to>, <B as JsLifetime<'js>>::Changed<'to>>
The target which has the same type as a
Self but with another lifetime 'tAuto Trait Implementations§
impl<A, B> Freeze for AnyOf2<A, B>
impl<A, B> RefUnwindSafe for AnyOf2<A, B>where
A: RefUnwindSafe,
B: RefUnwindSafe,
impl<A, B> Send for AnyOf2<A, B>
impl<A, B> Sync for AnyOf2<A, B>
impl<A, B> Unpin for AnyOf2<A, B>
impl<A, B> UnsafeUnpin for AnyOf2<A, B>where
A: UnsafeUnpin,
B: UnsafeUnpin,
impl<A, B> UnwindSafe for AnyOf2<A, B>where
A: UnwindSafe,
B: UnwindSafe,
Blanket Implementations§
Source§impl<'js, T> AsProperty<'js, T> for Twhere
T: IntoJs<'js>,
impl<'js, T> AsProperty<'js, T> for Twhere
T: IntoJs<'js>,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<'js, T> FromParam<'js> for Twhere
T: FromJs<'js>,
impl<'js, T> FromParam<'js> for Twhere
T: FromJs<'js>,
Source§fn param_requirement() -> ParamRequirement
fn param_requirement() -> ParamRequirement
The parameters requirements this value requires.
Source§fn from_param<'a>(params: &mut ParamsAccessor<'a, 'js>) -> Result<T, Error>
fn from_param<'a>(params: &mut ParamsAccessor<'a, 'js>) -> Result<T, Error>
Convert from a parameter value.
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