[−][src]Struct jlrs::value::array::TypedArray
Exactly the same as Array
, except it has an explicit element type T
.
Implementations
impl<'frame, 'data, T: Copy + ValidLayout> TypedArray<'frame, 'data, T>
[src]
pub fn dimensions(self) -> Dimensions
[src]
Returns the array's dimensions.
pub fn element_type(self) -> Value<'frame, 'static>
[src]
Returns the type of this array's elements.
pub fn is_inline_array(self) -> bool
[src]
Returns true if the elements of the array are stored inline.
pub fn has_inlined_pointers(self) -> bool
[src]
Returns true if the elements of the array are stored inline and at least one of the field of the inlined type is a pointer.
pub fn is_value_array(self) -> bool
[src]
Returns true if the elements of the array are stored as Value
s.
pub fn copy_inline_data(self) -> JlrsResult<CopiedArray<T>>
[src]
Copy the data of an inline array to Rust. Returns JlrsError::NotInline
if the data is
not stored inline or JlrsError::WrongType
if the type of the elements is incorrect.
pub fn inline_data<'borrow, 'fr, F>(
self,
frame: &'borrow F
) -> JlrsResult<ArrayData<'borrow, 'fr, T, F>> where
F: Frame<'fr>,
[src]
self,
frame: &'borrow F
) -> JlrsResult<ArrayData<'borrow, 'fr, T, F>> where
F: Frame<'fr>,
Immutably borrow inline array data, you can borrow data from multiple arrays at the same
time. Returns JlrsError::NotInline
if the data is not stored inline or
JlrsError::WrongType
if the type of the elements is incorrect.
pub fn inline_data_mut<'borrow, 'fr, F>(
self,
frame: &'borrow mut F
) -> JlrsResult<InlineArrayDataMut<'borrow, 'fr, T, F>> where
F: Frame<'fr>,
[src]
self,
frame: &'borrow mut F
) -> JlrsResult<InlineArrayDataMut<'borrow, 'fr, T, F>> where
F: Frame<'fr>,
Mutably borrow inline array data, you can mutably borrow a single array at the same time.
Returns JlrsError::NotInline
if the data is not stored inline or JlrsError::WrongType
if the type of the elements is incorrect.
pub unsafe fn unrestricted_inline_data_mut<'borrow, 'fr, F>(
self,
frame: &'borrow F
) -> JlrsResult<UnrestrictedInlineArrayDataMut<'borrow, 'fr, T, F>> where
F: Frame<'fr>,
[src]
self,
frame: &'borrow F
) -> JlrsResult<UnrestrictedInlineArrayDataMut<'borrow, 'fr, T, F>> where
F: Frame<'fr>,
Mutably borrow inline array data without the restriction that only a single array can be mutably borrowed. It's your responsibility to ensure you don't create multiple mutable references to the same array data.
Returns JlrsError::NotInline
if the data is not stored inline or JlrsError::WrongType
if the type of the elements is incorrect.
pub unsafe fn value_data<'borrow, 'fr, F>(
self,
frame: &'borrow F
) -> JlrsResult<ArrayData<'borrow, 'fr, Value<'frame, 'data>, F>> where
F: Frame<'fr>,
[src]
self,
frame: &'borrow F
) -> JlrsResult<ArrayData<'borrow, 'fr, Value<'frame, 'data>, F>> where
F: Frame<'fr>,
Immutably borrow the data of this value array, you can borrow data from multiple arrays at
the same time. The values themselves can be mutable, but you can't replace an element with
another value. Returns JlrsError::Inline
if the data is stored inline.
Safety: no slot on the GC stack is required to access and use the values in this array,
the GC is aware of the array's data. If the element is changed either from Rust or Julia,
the original value is no longer protected from garbage collection. If you need to keep
using this value you must protect it by calling Value::extend
.
pub unsafe fn value_data_mut<'borrow, 'fr, F>(
self,
frame: &'borrow mut F
) -> JlrsResult<ValueArrayDataMut<'borrow, 'frame, 'data, 'fr, F>> where
F: Frame<'fr>,
[src]
self,
frame: &'borrow mut F
) -> JlrsResult<ValueArrayDataMut<'borrow, 'frame, 'data, 'fr, F>> where
F: Frame<'fr>,
Mutably borrow the data of this value array, you can mutably borrow a single array at the
same time. Returns JlrsError::Inline
if the data is stored inline.
Safety: no slot on the GC stack is required to access and use the values in this array,
the GC is aware of the array's data. If the element is changed either from Rust or Julia,
the original value is no longer protected from garbage collection. If you need to keep
using this value you must protect it by calling Value::extend
.
pub unsafe fn unrestricted_value_data_mut<'borrow, 'fr, F>(
self,
frame: &'borrow F
) -> JlrsResult<UnrestrictedValueArrayDataMut<'borrow, 'frame, 'data, 'fr, F>> where
F: Frame<'fr>,
[src]
self,
frame: &'borrow F
) -> JlrsResult<UnrestrictedValueArrayDataMut<'borrow, 'frame, 'data, 'fr, F>> where
F: Frame<'fr>,
Mutably borrow the data of this value array without the restriction that only a single
array can be mutably borrowed. It's your responsibility to ensure you don't create
multiple mutable references to the same array data. Returns JlrsError::Inline
if the
data is stored inline.
Safety: no slot on the GC stack is required to access and use the values in this array,
the GC is aware of the array's data. If the element is changed either from Rust or Julia,
the original value is no longer protected from garbage collection. If you need to keep
using this value you must protect it by calling Value::extend
.
pub fn as_value(self) -> Value<'frame, 'data>
[src]
Convert self
to a Value
.
Trait Implementations
impl<'frame, 'data, T: Copy + ValidLayout> Cast<'frame, 'data> for TypedArray<'frame, 'data, T>
[src]
type Output = Self
pub fn cast(value: Value<'frame, 'data>) -> JlrsResult<Self::Output>
[src]
pub unsafe fn cast_unchecked(value: Value<'frame, 'data>) -> Self::Output
[src]
impl<'frame, 'data, T: Clone> Clone for TypedArray<'frame, 'data, T> where
T: Copy + ValidLayout,
[src]
T: Copy + ValidLayout,
pub fn clone(&self) -> TypedArray<'frame, 'data, T>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'frame, 'data, T: Copy> Copy for TypedArray<'frame, 'data, T> where
T: Copy + ValidLayout,
[src]
T: Copy + ValidLayout,
impl<'frame, 'data, T: Debug> Debug for TypedArray<'frame, 'data, T> where
T: Copy + ValidLayout,
[src]
T: Copy + ValidLayout,
impl<'frame, 'data, T: Copy + ValidLayout> Into<Array<'frame, 'data>> for TypedArray<'frame, 'data, T>
[src]
impl<'frame, 'data, T: Copy + ValidLayout> Into<Value<'frame, 'data>> for TypedArray<'frame, 'data, T>
[src]
impl<'frame, 'data, T: Copy + ValidLayout> JuliaTypecheck for TypedArray<'frame, 'data, T>
[src]
pub unsafe fn julia_typecheck(t: DataType<'_>) -> bool
[src]
impl<'frame, 'data, T: Copy + ValidLayout> ValidLayout for TypedArray<'frame, 'data, T>
[src]
pub unsafe fn valid_layout(v: Value<'_, '_>) -> bool
[src]
Auto Trait Implementations
impl<'frame, 'data, T> RefUnwindSafe for TypedArray<'frame, 'data, T> where
T: RefUnwindSafe,
[src]
T: RefUnwindSafe,
impl<'frame, 'data, T> !Send for TypedArray<'frame, 'data, T>
[src]
impl<'frame, 'data, T> !Sync for TypedArray<'frame, 'data, T>
[src]
impl<'frame, 'data, T> Unpin for TypedArray<'frame, 'data, T> where
T: Unpin,
[src]
T: Unpin,
impl<'frame, 'data, T> UnwindSafe for TypedArray<'frame, 'data, T> where
T: UnwindSafe,
[src]
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,