pub struct Fence { /* private fields */ }Expand description
The receiving counterpart of a DriverFence.
The Rust DMA fence implementation has a dualistic design: DriverFences
are the producer-side, intended to be always owned by only one party. That
party has the monopoly on signaling the fence.
A Fence is the counterpart for consumers. Thus, Fences are always
refcounted and can shared with an arbitrary number of parties, including
userspace. A Fence can only be used for actions such as checking the
fence’s status or for registering callbacks on it.
Once the associated DriverFence signals, all
FenceCallbackRegistrations registered on the Fence will be executed.
A Fence can arbitrarily outlive its DriverFence and the
FenceContext. Signaling a DriverFence decouples it from its
Fences.
Implementations§
Source§impl Fence
impl Fence
Sourcepub fn is_signaled(&self) -> bool
pub fn is_signaled(&self) -> bool
Check whether the fence was signaled at the moment of the function call.
Note that this can return true for a Fence whose DriverFence
has not yet been dropped. The reason is that the fence ops callbacks can
cause the fence to get signaled by the C backend.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Fence
impl !RefUnwindSafe for Fence
impl !Unpin for Fence
impl !UnsafeUnpin for Fence
impl UnwindSafe for Fence
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
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
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
self into a T. This operation is guaranteed to be lossless.