#[repr(C)]pub struct CFuture<V: 'static> { /* private fields */ }
Implementations§
Source§impl<V: 'static> CFuture<V>
impl<V: 'static> CFuture<V>
pub fn new( ptr: CAnyDropPtr, set_on_complete: unsafe extern "C" fn(future: &CFuture<V>, context: SyncPtr<Void>, value: *mut ManuallyDrop<V>, error: *mut ManuallyDrop<CError>, cb: CFutureOnCompleteCallback<V>) -> COptionResponseResult, ) -> Self
pub fn on_complete<F: 'static + FnOnce(Result<V>)>( self, cb: F, ) -> Option<Result<V>>
pub fn ptr(&self) -> &CAnyDropPtr
pub fn try_into_future(self) -> Result<impl Future<Output = Result<V>>>
Trait Implementations§
Auto Trait Implementations§
impl<V> Freeze for CFuture<V>
impl<V> RefUnwindSafe for CFuture<V>
impl<V> Send for CFuture<V>
impl<V> Sync for CFuture<V>
impl<V> Unpin for CFuture<V>
impl<V> UnwindSafe for CFuture<V>
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