pub struct ResumeRequester {
pub requester: fdf_env_resume_requester_t,
/* private fields */
}Expand description
A resume requester for fdf_env_register_resume_requester that can call any kind of callback.
§Safety
This object relies on a specific layout to allow it to be cast between a
*mut fdf_env_resume_requester_t and a *mut ResumeRequester. To that end,
it is important that this struct stay both #[repr(C)] and that requester be its first member.
Fields§
§requester: fdf_env_resume_requester_tThe underlying C structure.
Implementations§
Source§impl ResumeRequester
impl ResumeRequester
Sourcepub fn new<F: ResumeRequesterFn>(f: F) -> Self
pub fn new<F: ResumeRequesterFn>(f: F) -> Self
Creates a new ResumeRequester with f as the callback to run when the runtime needs to be resumed.
Sourcepub fn into_ptr(self) -> *mut fdf_env_resume_requester_t
pub fn into_ptr(self) -> *mut fdf_env_resume_requester_t
Turns this object into a stable pointer suitable for passing to
fdf_env_register_resume_requester by wrapping it in a Box and leaking it to be reconstituded
by Self::handler when the runtime needs to be resumed.
Auto Trait Implementations§
impl Freeze for ResumeRequester
impl !RefUnwindSafe for ResumeRequester
impl Send for ResumeRequester
impl Sync for ResumeRequester
impl Unpin for ResumeRequester
impl UnsafeUnpin for ResumeRequester
impl !UnwindSafe for ResumeRequester
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