pub enum SyncOrAsync<SyncValue, AsyncValue, F: Future<Output = AsyncValue>> {
Sync(SyncValue),
Async(F),
}Variants§
Implementations§
Source§impl<SyncOkValue, AsyncOkValue, E, F> SyncOrAsync<Result<SyncOkValue, E>, Result<AsyncOkValue, E>, F>
impl<SyncOkValue, AsyncOkValue, E, F> SyncOrAsync<Result<SyncOkValue, E>, Result<AsyncOkValue, E>, F>
pub fn into_error_future(self) -> Either<Ready<Option<E>>, ErrOptionFuture<F>> ⓘ
pub fn into_ok_future( self, ) -> Either<Ready<Option<SyncOrAsyncResolved<SyncOkValue, AsyncOkValue>>>, OkOptionFuture<SyncOkValue, AsyncOkValue, E, F>> ⓘ
pub fn into_result(self) -> Either<Ready<Result<AsyncOkValue, E>>, F> ⓘwhere
SyncOkValue: Into<AsyncOkValue>,
Source§impl<SyncOkValue, AsyncOkValue, E, F> SyncOrAsync<Result<SyncOkValue, E>, Result<AsyncOkValue, E>, F>
impl<SyncOkValue, AsyncOkValue, E, F> SyncOrAsync<Result<SyncOkValue, E>, Result<AsyncOkValue, E>, F>
pub fn into_future( self, ) -> Either<Ready<SyncOrAsyncResolved<Result<SyncOkValue, E>, Result<AsyncOkValue, E>>>, MapAsyncResultToResolved<SyncOkValue, AsyncOkValue, E, F>> ⓘ
Auto Trait Implementations§
impl<SyncValue, AsyncValue, F> Freeze for SyncOrAsync<SyncValue, AsyncValue, F>
impl<SyncValue, AsyncValue, F> RefUnwindSafe for SyncOrAsync<SyncValue, AsyncValue, F>where
SyncValue: RefUnwindSafe,
F: RefUnwindSafe,
impl<SyncValue, AsyncValue, F> Send for SyncOrAsync<SyncValue, AsyncValue, F>
impl<SyncValue, AsyncValue, F> Sync for SyncOrAsync<SyncValue, AsyncValue, F>
impl<SyncValue, AsyncValue, F> Unpin for SyncOrAsync<SyncValue, AsyncValue, F>
impl<SyncValue, AsyncValue, F> UnsafeUnpin for SyncOrAsync<SyncValue, AsyncValue, F>where
SyncValue: UnsafeUnpin,
F: UnsafeUnpin,
impl<SyncValue, AsyncValue, F> UnwindSafe for SyncOrAsync<SyncValue, AsyncValue, F>where
SyncValue: UnwindSafe,
F: 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> 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