Struct veilid_tools::EventualValue
source · pub struct EventualValue<T: Unpin> { /* private fields */ }Implementations§
source§impl<T: Unpin> EventualValue<T>
impl<T: Unpin> EventualValue<T>
pub fn new() -> Self
pub fn instance(&self) -> EventualValueFuture<T> ⓘ
pub fn resolve(&self, value: T) -> EventualResolvedFuture<Self> ⓘ
pub fn take_value(&self) -> Option<T>
Trait Implementations§
source§impl<T: Unpin> Clone for EventualValue<T>
impl<T: Unpin> Clone for EventualValue<T>
source§impl<T: Unpin> Debug for EventualValue<T>
impl<T: Unpin> Debug for EventualValue<T>
source§impl<T: Unpin> Default for EventualValue<T>
impl<T: Unpin> Default for EventualValue<T>
source§impl<T: Unpin> EventualBase for EventualValue<T>
impl<T: Unpin> EventualBase for EventualValue<T>
type ResolvedType = T
fn base_inner(&self) -> MutexGuard<'_, EventualBaseInner<Self::ResolvedType>>
fn resolve_to_value( &self, value: Self::ResolvedType ) -> EventualResolvedFuture<Self> ⓘ
Auto Trait Implementations§
impl<T> Freeze for EventualValue<T>
impl<T> !RefUnwindSafe for EventualValue<T>
impl<T> Send for EventualValue<T>where
T: Send,
impl<T> Sync for EventualValue<T>where
T: Send,
impl<T> Unpin for EventualValue<T>
impl<T> !UnwindSafe for EventualValue<T>
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> EventualCommon for Twhere
T: EventualBase,
impl<T> EventualCommon for Twhere
T: EventualBase,
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