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

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.

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]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Copy for Lifetime
[src]

impl PartialEq for Lifetime
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Debug for Lifetime
[src]

Formats the value using the given formatter.