Enum rustc_incremental::persist::load::MaybeAsync
source · pub enum MaybeAsync<T> {
Sync(T),
Async(JoinHandle<T>),
}
Expand description
Either a result that has already be computed or a handle that will let us wait until it is computed by a background thread.
Variants§
Sync(T)
Async(JoinHandle<T>)
Implementations§
source§impl<T> MaybeAsync<LoadResult<T>>
impl<T> MaybeAsync<LoadResult<T>>
sourcepub fn open(self) -> LoadResult<T>
pub fn open(self) -> LoadResult<T>
Accesses the data returned in LoadResult::Ok
in an asynchronous way if possible.
Auto Trait Implementations§
impl<T> !RefUnwindSafe for MaybeAsync<T>
impl<T> Send for MaybeAsync<T>where
T: Send,
impl<T> Sync for MaybeAsync<T>where
T: Sync,
impl<T> Unpin for MaybeAsync<T>where
T: Unpin,
impl<T> !UnwindSafe for MaybeAsync<T>
Blanket Implementations§
Layout§
Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.