pub struct AsyncBlocker { /* private fields */ }Available on crate feature
asynchronous only.Expand description
Blocker that can be used to block in async code.
Implementations§
Source§impl AsyncBlocker
impl AsyncBlocker
Sourcepub fn new(capacity: usize) -> AsyncBlocker
pub fn new(capacity: usize) -> AsyncBlocker
Create a new AsyncBlocker with the given capacity.
Sourcepub async fn wait(&mut self) -> Result<(), LogFSError>
pub async fn wait(&mut self) -> Result<(), LogFSError>
Block and await the current task until a registered caller unblocks it.
Trait Implementations§
Source§impl Blocker for AsyncBlocker
impl Blocker for AsyncBlocker
Auto Trait Implementations§
impl !RefUnwindSafe for AsyncBlocker
impl !UnwindSafe for AsyncBlocker
impl Freeze for AsyncBlocker
impl Send for AsyncBlocker
impl Sync for AsyncBlocker
impl Unpin for AsyncBlocker
impl UnsafeUnpin for AsyncBlocker
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