Trait tskit::ffi::TskitType[][src]

pub trait TskitType<T> {
    fn wrap() -> Self;
fn as_ptr(&self) -> *const T;
fn as_mut_ptr(&mut self) -> *mut T; }

Define what it means to wrap a tskit struct. In practice, one needs to implement Drop for test types, calling the tsk_foo_free() function corresponding to tsk_foo_t.

Required methods

fn wrap() -> Self[src]

Encapsulate tsk_foo_t and return rust object. Best practices seem to suggest using Box for this.

fn as_ptr(&self) -> *const T[src]

Return const pointer

fn as_mut_ptr(&mut self) -> *mut T[src]

Return mutable pointer

Loading content...

Implementors

Loading content...