[][src]Struct ringbahn::event::Cancellation

pub struct Cancellation { /* fields omitted */ }

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]

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

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.