#[repr(C)]pub struct IOEvent<C: IOCallbackCustom> {
pub buf: Option<Buffer>,
pub offset: i64,
pub action: IOAction,
pub fd: RawFd,
/* private fields */
}Fields§
§buf: Option<Buffer>§offset: i64§action: IOAction§fd: RawFdImplementations§
Source§impl<C: IOCallbackCustom> IOEvent<C>
impl<C: IOCallbackCustom> IOEvent<C>
pub fn new(fd: RawFd, buf: Buffer, action: IOAction, offset: i64) -> Box<Self>
Sourcepub fn set_callback(&mut self, cb: C)
pub fn set_callback(&mut self, cb: C)
Set callback for IOEvent, might be closure or a custom struct
pub fn get_size(&self) -> usize
pub fn push_to_list(self: Box<Self>, events: &mut EmbeddedList)
pub fn pop_from_list(events: &mut EmbeddedList) -> Option<Box<Self>>
pub fn get_buf_ref<'a>(&'a self) -> &'a [u8] ⓘ
pub fn is_done(&self) -> bool
pub fn get_result(&mut self) -> Result<Buffer, Errno>
pub fn _get_result(&mut self) -> Result<Buffer, i32>
Trait Implementations§
Auto Trait Implementations§
impl<C> !Freeze for IOEvent<C>
impl<C> RefUnwindSafe for IOEvent<C>where
C: RefUnwindSafe,
impl<C> Send for IOEvent<C>
impl<C> Sync for IOEvent<C>where
C: Sync,
impl<C> Unpin for IOEvent<C>
impl<C> UnwindSafe for IOEvent<C>where
C: UnwindSafe,
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