pub trait NdArray<'borrow, T>: Sealed {
// Required methods
fn array_view<'frame: 'borrow, F>(
self,
frame: &'borrow F,
) -> JlrsResult<ArrayView<'borrow, T, Dim<IxDynImpl>>>
where F: Frame<'frame>,
T: ValidLayout + Copy;
fn array_view_mut<'frame: 'borrow, F>(
self,
frame: &'borrow mut F,
) -> JlrsResult<ArrayViewMut<'borrow, T, Dim<IxDynImpl>>>
where F: Frame<'frame>,
T: ValidLayout + Copy;
}
Expand description
Trait to borrow Julia arrays with inline data as ndarray
’s ArrayView
and ArrayViewMut
.
Required Methods§
Sourcefn array_view<'frame: 'borrow, F>(
self,
frame: &'borrow F,
) -> JlrsResult<ArrayView<'borrow, T, Dim<IxDynImpl>>>
fn array_view<'frame: 'borrow, F>( self, frame: &'borrow F, ) -> JlrsResult<ArrayView<'borrow, T, Dim<IxDynImpl>>>
Borrow the data in the array as an ArrayView
. Returns an error if the wrong type is
provided or the data is not stored inline.
Sourcefn array_view_mut<'frame: 'borrow, F>(
self,
frame: &'borrow mut F,
) -> JlrsResult<ArrayViewMut<'borrow, T, Dim<IxDynImpl>>>
fn array_view_mut<'frame: 'borrow, F>( self, frame: &'borrow mut F, ) -> JlrsResult<ArrayViewMut<'borrow, T, Dim<IxDynImpl>>>
Mutably borrow the data in the array as an ArrayViewMut
. Returns an error if the wrong
type is provided or the data is not stored inline.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.