pub enum Either<A, B> {
A(A),
B(B),
}
Variants§
Implementations§
Trait Implementations§
source§impl<A, B> FromNapiValue for Either<A, B>where
A: TypeName + FromNapiValue + ValidateNapiValue,
B: TypeName + FromNapiValue + ValidateNapiValue,
impl<A, B> FromNapiValue for Either<A, B>where A: TypeName + FromNapiValue + ValidateNapiValue, B: TypeName + FromNapiValue + ValidateNapiValue,
source§unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>
unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>
Safety Read more
fn from_unknown(value: JsUnknown) -> Result<Self>
source§impl<A, B> ToNapiValue for Either<A, B>where
A: ToNapiValue,
B: ToNapiValue,
impl<A, B> ToNapiValue for Either<A, B>where A: ToNapiValue, B: ToNapiValue,
source§unsafe fn to_napi_value(env: napi_env, value: Self) -> Result<napi_value>
unsafe fn to_napi_value(env: napi_env, value: Self) -> Result<napi_value>
Safety Read more
source§impl<A, B> ValidateNapiValue for Either<A, B>where
A: ValidateNapiValue,
B: ValidateNapiValue,
impl<A, B> ValidateNapiValue for Either<A, B>where A: ValidateNapiValue, B: ValidateNapiValue,
source§unsafe fn validate(env: napi_env, napi_val: napi_value) -> Result<napi_value>
unsafe fn validate(env: napi_env, napi_val: napi_value) -> Result<napi_value>
Safety Read more
impl<A: Copy, B: Copy> Copy for Either<A, B>
Auto Trait Implementations§
impl<A, B> RefUnwindSafe for Either<A, B>where A: RefUnwindSafe, B: RefUnwindSafe,
impl<A, B> Send for Either<A, B>where A: Send, B: Send,
impl<A, B> Sync for Either<A, B>where A: Sync, B: Sync,
impl<A, B> Unpin for Either<A, B>where A: Unpin, B: Unpin,
impl<A, B> UnwindSafe for Either<A, B>where A: UnwindSafe, B: 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