DataExchange

Trait DataExchange 

Source
pub trait DataExchange<T: Clone + 'static> {
    // Required methods
    fn export_data(
        &self,
        interface: &ZeroCopyInterface,
        name: &str,
    ) -> CoreResult<DataId>;
    fn from_interface(
        interface: &ZeroCopyInterface,
        name: &str,
    ) -> CoreResult<Self>
       where Self: Sized;
}
Expand description

Trait for types that can participate in zero-copy data exchange

Required Methods§

Source

fn export_data( &self, interface: &ZeroCopyInterface, name: &str, ) -> CoreResult<DataId>

Export data to the zero-copy interface

Source

fn from_interface(interface: &ZeroCopyInterface, name: &str) -> CoreResult<Self>
where Self: Sized,

Import data from the zero-copy interface

Implementations on Foreign Types§

Source§

impl<T: Clone + 'static + Send + Sync + Debug> DataExchange<T> for Vec<T>

Source§

fn export_data( &self, interface: &ZeroCopyInterface, name: &str, ) -> CoreResult<DataId>

Source§

fn from_interface(interface: &ZeroCopyInterface, name: &str) -> CoreResult<Self>

Implementors§

Source§

impl<A> DataExchange<A> for MemoryMappedArray<A>
where A: Clone + Copy + 'static + Send + Sync + Debug,