pub struct GpuFencePool { /* private fields */ }Expand description
A pool that manages a collection of GpuFence objects.
Implementations§
Source§impl GpuFencePool
impl GpuFencePool
Sourcepub fn create_fence(&mut self) -> GpuFence
pub fn create_fence(&mut self) -> GpuFence
Creates or recycles a fence and returns it in Pending state.
Sourcepub fn return_fence(&mut self, fence: GpuFence)
pub fn return_fence(&mut self, fence: GpuFence)
Returns a fence to the pool.
Sourcepub fn active_count(&self) -> usize
pub fn active_count(&self) -> usize
Returns the number of active (in-use) fences.
Sourcepub fn completed_count(&self) -> usize
pub fn completed_count(&self) -> usize
Returns the number of completed (signalled) fences among active ones.
Sourcepub fn total_created(&self) -> u64
pub fn total_created(&self) -> u64
Returns the total number of fences ever created by this pool.
Sourcepub fn active_fences(&self) -> &[GpuFence]
pub fn active_fences(&self) -> &[GpuFence]
Returns a reference to all currently active fences.
Trait Implementations§
Source§impl Debug for GpuFencePool
impl Debug for GpuFencePool
Source§impl Default for GpuFencePool
impl Default for GpuFencePool
Source§fn default() -> GpuFencePool
fn default() -> GpuFencePool
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for GpuFencePool
impl RefUnwindSafe for GpuFencePool
impl Send for GpuFencePool
impl Sync for GpuFencePool
impl Unpin for GpuFencePool
impl UnsafeUnpin for GpuFencePool
impl UnwindSafe for GpuFencePool
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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