pub struct PollInit<'a, T> { /* private fields */ }
Expand description
Polling mechanism to initialize a value contained in some
InitOnce
instance.
Implementations§
Source§impl<'init_once, T> PollInit<'init_once, T>
impl<'init_once, T> PollInit<'init_once, T>
Sourcepub async fn init_async<F>(&mut self, init: F) -> &'init_once Twhere
F: Future<Output = T>,
pub async fn init_async<F>(&mut self, init: F) -> &'init_once Twhere
F: Future<Output = T>,
Initialize the associated InitOnce
with the given future init
.
Trait Implementations§
Auto Trait Implementations§
impl<'a, T> Freeze for PollInit<'a, T>
impl<'a, T> !RefUnwindSafe for PollInit<'a, T>
impl<'a, T> Send for PollInit<'a, T>where
T: Sync,
impl<'a, T> Sync for PollInit<'a, T>where
T: Sync,
impl<'a, T> Unpin for PollInit<'a, T>
impl<'a, T> !UnwindSafe for PollInit<'a, 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