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§
Sourcefn export_data(
&self,
interface: &ZeroCopyInterface,
name: &str,
) -> CoreResult<DataId>
fn export_data( &self, interface: &ZeroCopyInterface, name: &str, ) -> CoreResult<DataId>
Export data to the zero-copy interface
Sourcefn from_interface(interface: &ZeroCopyInterface, name: &str) -> CoreResult<Self>where
Self: Sized,
fn from_interface(interface: &ZeroCopyInterface, name: &str) -> CoreResult<Self>where
Self: Sized,
Import data from the zero-copy interface