pub struct InlineClosure<C: CbArgs>(pub Box<dyn Fn(C, i64, Result<Option<Buffer>, Errno>) + Send>);Expand description
Example Inline worker that executes callbacks directly without spawning threads. Use this for very lightweight callback logic to avoid thread context switching overhead.
§Safety
It does not resubmit short I/O
Tuple Fields§
§0: Box<dyn Fn(C, i64, Result<Option<Buffer>, Errno>) + Send>Trait Implementations§
Auto Trait Implementations§
impl<C> Freeze for InlineClosure<C>
impl<C> !RefUnwindSafe for InlineClosure<C>
impl<C> Send for InlineClosure<C>
impl<C> !Sync for InlineClosure<C>
impl<C> Unpin for InlineClosure<C>
impl<C> UnsafeUnpin for InlineClosure<C>
impl<C> !UnwindSafe for InlineClosure<C>
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