Struct gnunet_sys::GNUNET_SCHEDULER_Driver [−][src]
API an external event loop has to implement for #GNUNET_SCHEDULER_driver_init.
Fields
cls: *mut c_void
Closure to pass to the functions in this struct.
add: Option<unsafe extern "C" fn(cls: *mut c_void, task: *mut GNUNET_SCHEDULER_Task, fdi: *mut GNUNET_SCHEDULER_FdInfo) -> c_int>
Add a @a task to be run if the conditions specified in the et field of the given @a fdi are satisfied. The et field will be cleared after this call and the driver is expected to set the type of the actual event before passing @a fdi to #GNUNET_SCHEDULER_task_ready.
@param cls closure @param task task to add @param fdi conditions to watch for @return #GNUNET_OK on success, #GNUNET_SYSERR on failure (i.e. @a fdi too high or invalid)
del: Option<unsafe extern "C" fn(cls: *mut c_void, task: *mut GNUNET_SCHEDULER_Task) -> c_int>
Delete a @a task from the set of tasks to be run. A task may comprise multiple FdInfo entries previously added with the add function. The driver is expected to delete them all.
@param cls closure @param task task to delete @return #GNUNET_OK on success, #GNUNET_SYSERR on failure (i.e. @a task does not match prior @e add call)
set_wakeup: Option<unsafe extern "C" fn(cls: *mut c_void, dt: GNUNET_TIME_Absolute)>
Set time at which we definitively want to get a wakeup call.
@param cls closure @param dt time when we want to wake up next
Trait Implementations
impl Clone for GNUNET_SCHEDULER_Driver
[src]
fn clone(&self) -> GNUNET_SCHEDULER_Driver
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for GNUNET_SCHEDULER_Driver
[src]
impl Debug for GNUNET_SCHEDULER_Driver
[src]
Auto Trait Implementations
impl RefUnwindSafe for GNUNET_SCHEDULER_Driver
impl !Send for GNUNET_SCHEDULER_Driver
impl !Sync for GNUNET_SCHEDULER_Driver
impl Unpin for GNUNET_SCHEDULER_Driver
impl UnwindSafe for GNUNET_SCHEDULER_Driver
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,
pub 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> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
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.
pub 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>,