pub struct FenceCallbackRegistration<T: FenceCallback + 'static> { /* private fields */ }Expand description
A callback registration on a fence.
When this object is dropped, the callback is automatically removed if it hasn’t been called yet.
Implementations§
Source§impl<T: FenceCallback + 'static> FenceCallbackRegistration<T>
impl<T: FenceCallback + 'static> FenceCallbackRegistration<T>
Source§impl<T: FenceCallback> FenceCallbackRegistration<T>
impl<T: FenceCallback> FenceCallbackRegistration<T>
Sourcepub fn new<'a>(
fence: &'a Fence,
callback: T,
) -> impl PinInit<Self, CallbackError<T>> + 'awhere
T: 'a,
pub fn new<'a>(
fence: &'a Fence,
callback: T,
) -> impl PinInit<Self, CallbackError<T>> + 'awhere
T: 'a,
Create a PinInit closure for registering a callback on a fence.
The actual attempt at registering the callback will take place once you
call an allocator’s pin_init() function.
On success the callback is pinned in place and will fire when the fence
signals. On AlreadySignaled the callback is returned to the caller so
that owned resources can be reclaimed.
Trait Implementations§
Source§impl<T: FenceCallback + 'static> Drop for FenceCallbackRegistration<T>
impl<T: FenceCallback + 'static> Drop for FenceCallbackRegistration<T>
Source§impl<T: FenceCallback + 'static> HasPinData for FenceCallbackRegistration<T>
impl<T: FenceCallback + 'static> HasPinData for FenceCallbackRegistration<T>
Source§impl<T: FenceCallback> PinnedDrop for FenceCallbackRegistration<T>
impl<T: FenceCallback> PinnedDrop for FenceCallbackRegistration<T>
impl<T: FenceCallback> Send for FenceCallbackRegistration<T>
impl<T> Sync for FenceCallbackRegistration<T>where
T: Sync + FenceCallback,
Auto Trait Implementations§
impl<T> !Freeze for FenceCallbackRegistration<T>
impl<T> !RefUnwindSafe for FenceCallbackRegistration<T>
impl<T> !UnsafeUnpin for FenceCallbackRegistration<T>
impl<T> !UnwindSafe for FenceCallbackRegistration<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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<S, T> IntoSafeCast<T> for Swhere
T: FromSafeCast<S>,
impl<S, T> IntoSafeCast<T> for Swhere
T: FromSafeCast<S>,
Source§fn into_safe_cast(self) -> T
fn into_safe_cast(self) -> T
Convert
self into a T. This operation is guaranteed to be lossless.Source§impl<S, T> IntoSafeCastArch<T> for Swhere
T: FromSafeCastArch<S>,
impl<S, T> IntoSafeCastArch<T> for Swhere
T: FromSafeCastArch<S>,
Source§fn into_safe_cast_arch(self) -> T
fn into_safe_cast_arch(self) -> T
Convert
self into a T. This operation is guaranteed to be lossless.