pub struct Fence { /* private fields */ }Implementations§
Source§impl Fence
Fence provides a timed rate limiter. It’s useful for imposing a framerate
cap on a UI thread.
impl Fence
Fence provides a timed rate limiter. It’s useful for imposing a framerate cap on a UI thread.
In a typical usage, place a fence at the end of a loop to control the invocation rate.
Sourcepub fn from_millis(m: u64) -> Fence
pub fn from_millis(m: u64) -> Fence
Construct a fence from the specified milliseconds.
Sourcepub fn from_duration(dur: Duration) -> Fence
pub fn from_duration(dur: Duration) -> Fence
Construct a fence from the given duration.
Auto Trait Implementations§
impl Freeze for Fence
impl RefUnwindSafe for Fence
impl Send for Fence
impl Sync for Fence
impl Unpin 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
Mutably borrows from an owned value. Read more