[−][src]Struct ringbahn::event::Cancellation
A cancellation callback when IO gets cancelled.
When an event waiting to complete on io-uring gets cancelled, a cancellation is constructed to clean up the resources that event was using, after it completes.
Implementations
impl Cancellation
[src]
pub fn new(
data: *mut (),
metadata: usize,
callback: unsafe fn(_: *mut (), _: usize)
) -> Cancellation
[src]
data: *mut (),
metadata: usize,
callback: unsafe fn(_: *mut (), _: usize)
) -> Cancellation
Construct a new cancellation callback to be called.
Safety
The callback argument is an unsafe function pointer. In this case, the callback can assume these additional invariants:
The arguments passed into the callback will be the same values as the arguments passed to Cancellation::new. The callback will be called exactly one or zero times. The callback will only be called after the kernel has yielded the CQE associated with the event this callback is meant to cancel.
pub fn null() -> Cancellation
[src]
Auto Trait Implementations
impl RefUnwindSafe for Cancellation
impl !Send for Cancellation
impl !Sync for Cancellation
impl Unpin for Cancellation
impl UnwindSafe for Cancellation
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,