#[repr(C)]
pub struct mts_array_t { pub ptr: *mut c_void, pub origin: Option<unsafe extern "C" fn(array: *const c_void, origin: *mut mts_data_origin_t) -> mts_status_t>, pub data: Option<unsafe extern "C" fn(array: *mut c_void, data: *mut *mut f64) -> mts_status_t>, pub shape: Option<unsafe extern "C" fn(array: *const c_void, shape: *mut *const usize, shape_count: *mut usize) -> mts_status_t>, pub reshape: Option<unsafe extern "C" fn(array: *mut c_void, shape: *const usize, shape_count: usize) -> mts_status_t>, pub swap_axes: Option<unsafe extern "C" fn(array: *mut c_void, axis_1: usize, axis_2: usize) -> mts_status_t>, pub create: Option<unsafe extern "C" fn(array: *const c_void, shape: *const usize, shape_count: usize, new_array: *mut mts_array_t) -> mts_status_t>, pub copy: Option<unsafe extern "C" fn(array: *const c_void, new_array: *mut mts_array_t) -> mts_status_t>, pub destroy: Option<unsafe extern "C" fn(array: *mut c_void)>, pub move_samples_from: Option<unsafe extern "C" fn(output: *mut c_void, input: *const c_void, samples: *const mts_sample_mapping_t, samples_count: usize, property_start: usize, property_end: usize) -> mts_status_t>, }

Fields§

§ptr: *mut c_void§origin: Option<unsafe extern "C" fn(array: *const c_void, origin: *mut mts_data_origin_t) -> mts_status_t>§data: Option<unsafe extern "C" fn(array: *mut c_void, data: *mut *mut f64) -> mts_status_t>§shape: Option<unsafe extern "C" fn(array: *const c_void, shape: *mut *const usize, shape_count: *mut usize) -> mts_status_t>§reshape: Option<unsafe extern "C" fn(array: *mut c_void, shape: *const usize, shape_count: usize) -> mts_status_t>§swap_axes: Option<unsafe extern "C" fn(array: *mut c_void, axis_1: usize, axis_2: usize) -> mts_status_t>§create: Option<unsafe extern "C" fn(array: *const c_void, shape: *const usize, shape_count: usize, new_array: *mut mts_array_t) -> mts_status_t>§copy: Option<unsafe extern "C" fn(array: *const c_void, new_array: *mut mts_array_t) -> mts_status_t>§destroy: Option<unsafe extern "C" fn(array: *mut c_void)>§move_samples_from: Option<unsafe extern "C" fn(output: *mut c_void, input: *const c_void, samples: *const mts_sample_mapping_t, samples_count: usize, property_start: usize, property_end: usize) -> mts_status_t>

Implementations§

source§

impl mts_array_t

source

pub fn null() -> mts_array_t

Create an mts_array_t with all members set to null pointers/None

source

pub fn origin(&self) -> Result<mts_data_origin_t, Error>

call mts_array_t.origin with a more convenient API

source

pub fn shape(&self) -> Result<&[usize], Error>

call mts_array_t.shape with a more convenient API

source

pub fn data(&mut self) -> Result<&mut [f64], Error>

call mts_array_t.data with a more convenient API

source

pub fn reshape(&mut self, shape: &[usize]) -> Result<(), Error>

call mts_array_t.reshape with a more convenient API

source

pub fn swap_axes(&mut self, axis_1: usize, axis_2: usize) -> Result<(), Error>

call mts_array_t.swap_axes with a more convenient API

source

pub fn create(&self, shape: &[usize]) -> Result<mts_array_t, Error>

call mts_array_t.create with a more convenient API

source

pub fn move_samples_from( &mut self, input: &mts_array_t, samples: &[mts_sample_mapping_t], properties: Range<usize> ) -> Result<(), Error>

call mts_array_t.move_samples_from with a more convenient API

Trait Implementations§

source§

impl Clone for mts_array_t

source§

fn clone(&self) -> mts_array_t

Returns a copy 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 Debug for mts_array_t

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<Box<dyn Array>> for mts_array_t

source§

fn from(array: Box<dyn Array>) -> Self

Converts to this type from the input type.
source§

impl Copy for mts_array_t

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. 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 Twhere 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 Twhere T: Clone,

§

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 Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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.