Struct deno_libffi::middle::ClosureOnce [−][src]
pub struct ClosureOnce { /* fields omitted */ }
Expand description
A closure that owns needs-drop data.
This allows the closure’s callback to take ownership of the data, in which case the userdata will be gone if called again.
Implementations
Obtains the callable code pointer for a closure.
Safety
The result needs to be transmuted to the correct type before it can be called. If the type is wrong then undefined behavior will result.
Transmutes the callable code pointer for a closure to a reference to any type. This is intended to be used to transmute it to its correct function type in order to call it.
Safety
This method allows transmuting to a reference to any sized type, and cannot check whether the code pointer actually has that type. If the type is wrong then undefined behavior will result.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for ClosureOnce
impl !Send for ClosureOnce
impl !Sync for ClosureOnce
impl Unpin for ClosureOnce
impl !UnwindSafe for ClosureOnce