Struct GraphInterpreterApi

Source
#[repr(C)]
pub struct GraphInterpreterApi {
Show 19 fields pub create_graph_interpreter: Option<unsafe extern "C" fn(allocator: *mut AllocatorI) -> *mut GraphInterpreterO>, pub destroy_graph_interpreter: Option<unsafe extern "C" fn(gr: *mut GraphInterpreterO)>, pub set_graph: Option<unsafe extern "C" fn(gr: *mut GraphInterpreterO, graph_id: TtIdT, nodes: *const GraphInterpreterNodeT, num_nodes: u32, num_wires: u32, node_wires: *mut u32, num_node_wires: u32, dependencies: *mut u32, num_dependencies: u32)>, pub get_graph: Option<unsafe extern "C" fn(gr: *mut GraphInterpreterO) -> TtIdT>, pub run_node_at_index: Option<unsafe extern "C" fn(gr: *mut GraphInterpreterO, node: u32)>, pub add_event_node: Option<unsafe extern "C" fn(gr: *mut GraphInterpreterO, unique_id: u64, e: StrhashT, node: u32)>, pub trigger_event: Option<unsafe extern "C" fn(gr: *mut GraphInterpreterO, e: StrhashT)>, pub trigger_wire: Option<unsafe extern "C" fn(gr: *mut GraphInterpreterO, wire: u32)>, pub queue_event: Option<unsafe extern "C" fn(gr: *mut GraphInterpreterO, e: StrhashT)>, pub queue_wire: Option<unsafe extern "C" fn(gr: *mut GraphInterpreterO, wire: u32, delay: f32)>, pub tick_queue: Option<unsafe extern "C" fn(gr: *mut GraphInterpreterO, dt: f32)>, pub get_node_run_context: Option<unsafe extern "C" fn(gr: *mut GraphInterpreterO, node: u32) -> GraphInterpreterContextT>, pub read_wire: Option<unsafe extern "C" fn(gr: *mut GraphInterpreterO, wire: u32) -> GraphInterpreterWireContentT>, pub read_wires: Option<unsafe extern "C" fn(gr: *mut GraphInterpreterO, content: *mut GraphInterpreterWireContentT, wires: *const u32, n: u32)>, pub read_wires_indirect: Option<unsafe extern "C" fn(gr: *mut GraphInterpreterO, content: *mut *mut GraphInterpreterWireContentT, wires: *const u32, n: u32)>, pub write_wire: Option<unsafe extern "C" fn(gr: *mut GraphInterpreterO, wire: u32, n: u32, size: u32) -> *mut c_void>, pub read_variable: Option<unsafe extern "C" fn(gr: *mut GraphInterpreterO, variable: u64) -> GraphInterpreterWireContentT>, pub write_variable: Option<unsafe extern "C" fn(gr: *mut GraphInterpreterO, variable: u64, n: u32, size: u32) -> *mut c_void>, pub all_variables: Option<unsafe extern "C" fn(gr: *mut GraphInterpreterO, allocator: *mut AllocatorI) -> *mut u64>,
}

Fields§

§create_graph_interpreter: Option<unsafe extern "C" fn(allocator: *mut AllocatorI) -> *mut GraphInterpreterO>§destroy_graph_interpreter: Option<unsafe extern "C" fn(gr: *mut GraphInterpreterO)>§set_graph: Option<unsafe extern "C" fn(gr: *mut GraphInterpreterO, graph_id: TtIdT, nodes: *const GraphInterpreterNodeT, num_nodes: u32, num_wires: u32, node_wires: *mut u32, num_node_wires: u32, dependencies: *mut u32, num_dependencies: u32)>§get_graph: Option<unsafe extern "C" fn(gr: *mut GraphInterpreterO) -> TtIdT>§run_node_at_index: Option<unsafe extern "C" fn(gr: *mut GraphInterpreterO, node: u32)>§add_event_node: Option<unsafe extern "C" fn(gr: *mut GraphInterpreterO, unique_id: u64, e: StrhashT, node: u32)>§trigger_event: Option<unsafe extern "C" fn(gr: *mut GraphInterpreterO, e: StrhashT)>§trigger_wire: Option<unsafe extern "C" fn(gr: *mut GraphInterpreterO, wire: u32)>§queue_event: Option<unsafe extern "C" fn(gr: *mut GraphInterpreterO, e: StrhashT)>§queue_wire: Option<unsafe extern "C" fn(gr: *mut GraphInterpreterO, wire: u32, delay: f32)>§tick_queue: Option<unsafe extern "C" fn(gr: *mut GraphInterpreterO, dt: f32)>§get_node_run_context: Option<unsafe extern "C" fn(gr: *mut GraphInterpreterO, node: u32) -> GraphInterpreterContextT>§read_wire: Option<unsafe extern "C" fn(gr: *mut GraphInterpreterO, wire: u32) -> GraphInterpreterWireContentT>§read_wires: Option<unsafe extern "C" fn(gr: *mut GraphInterpreterO, content: *mut GraphInterpreterWireContentT, wires: *const u32, n: u32)>§read_wires_indirect: Option<unsafe extern "C" fn(gr: *mut GraphInterpreterO, content: *mut *mut GraphInterpreterWireContentT, wires: *const u32, n: u32)>§write_wire: Option<unsafe extern "C" fn(gr: *mut GraphInterpreterO, wire: u32, n: u32, size: u32) -> *mut c_void>§read_variable: Option<unsafe extern "C" fn(gr: *mut GraphInterpreterO, variable: u64) -> GraphInterpreterWireContentT>§write_variable: Option<unsafe extern "C" fn(gr: *mut GraphInterpreterO, variable: u64, n: u32, size: u32) -> *mut c_void>§all_variables: Option<unsafe extern "C" fn(gr: *mut GraphInterpreterO, allocator: *mut AllocatorI) -> *mut u64>

Implementations§

Source§

impl GraphInterpreterApi

Source

pub unsafe fn create_graph_interpreter( &self, allocator: *mut AllocatorI, ) -> *mut GraphInterpreterO

Source

pub unsafe fn destroy_graph_interpreter(&self, gr: *mut GraphInterpreterO)

Source

pub unsafe fn set_graph( &self, gr: *mut GraphInterpreterO, graph_id: TtIdT, nodes: *const GraphInterpreterNodeT, num_nodes: u32, num_wires: u32, node_wires: *mut u32, num_node_wires: u32, dependencies: *mut u32, num_dependencies: u32, )

Source

pub unsafe fn get_graph(&self, gr: *mut GraphInterpreterO) -> TtIdT

Source

pub unsafe fn run_node_at_index(&self, gr: *mut GraphInterpreterO, node: u32)

Source

pub unsafe fn add_event_node( &self, gr: *mut GraphInterpreterO, unique_id: u64, e: StrhashT, node: u32, )

Source

pub unsafe fn trigger_event(&self, gr: *mut GraphInterpreterO, e: StrhashT)

Source

pub unsafe fn trigger_wire(&self, gr: *mut GraphInterpreterO, wire: u32)

Source

pub unsafe fn queue_event(&self, gr: *mut GraphInterpreterO, e: StrhashT)

Source

pub unsafe fn queue_wire( &self, gr: *mut GraphInterpreterO, wire: u32, delay: f32, )

Source

pub unsafe fn tick_queue(&self, gr: *mut GraphInterpreterO, dt: f32)

Source

pub unsafe fn get_node_run_context( &self, gr: *mut GraphInterpreterO, node: u32, ) -> GraphInterpreterContextT

Source

pub unsafe fn read_wire( &self, gr: *mut GraphInterpreterO, wire: u32, ) -> GraphInterpreterWireContentT

Source

pub unsafe fn read_wires( &self, gr: *mut GraphInterpreterO, content: *mut GraphInterpreterWireContentT, wires: *const u32, n: u32, )

Source

pub unsafe fn read_wires_indirect( &self, gr: *mut GraphInterpreterO, content: *mut *mut GraphInterpreterWireContentT, wires: *const u32, n: u32, )

Source

pub unsafe fn write_wire( &self, gr: *mut GraphInterpreterO, wire: u32, n: u32, size: u32, ) -> *mut c_void

Source

pub unsafe fn read_variable( &self, gr: *mut GraphInterpreterO, variable: u64, ) -> GraphInterpreterWireContentT

Source

pub unsafe fn write_variable( &self, gr: *mut GraphInterpreterO, variable: u64, n: u32, size: u32, ) -> *mut c_void

Source

pub unsafe fn all_variables( &self, gr: *mut GraphInterpreterO, allocator: *mut AllocatorI, ) -> *mut u64

Trait Implementations§

Source§

impl Api for GraphInterpreterApi

Source§

impl Clone for GraphInterpreterApi

Source§

fn clone(&self) -> GraphInterpreterApi

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Default for GraphInterpreterApi

Source§

fn default() -> GraphInterpreterApi

Returns the “default value” for a type. Read more
Source§

impl Copy for GraphInterpreterApi

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.