Enum imageflow::Lifetime
[−]
[src]
#[repr(C)]pub enum Lifetime { OutlivesFunctionCall, OutlivesContext, }
How long the provided pointer/buffer will remain valid. Callers must prevent the memory from being freed or moved until this contract expires.
Variants
OutlivesFunctionCall
Pointer will outlive function call. If the host language has a garbage collector, call the appropriate method to ensure the object pointed to will not be collected or moved until the call returns. You may think host languages do this automatically in their FFI system. Most do not.
OutlivesContext
Pointer will outlive context. If the host language has a GC, ensure that you are using a data type guaranteed to neither be moved or collected automatically.
Trait Implementations
impl Clone for Lifetime
[src]
fn clone(&self) -> Lifetime
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Copy for Lifetime
[src]
impl PartialEq for Lifetime
[src]
fn eq(&self, __arg_0: &Lifetime) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.