#[repr(transparent)]pub struct Array<'scope, 'data>(_, _, _);
Expand description
An n-dimensional Julia array.
Each element in the backing storage is either stored as a Value
or inline. If the inline
data is a bits union, the flag indicating the active variant is stored separately from the
elements. You can check how the data is stored by calling Array::is_value_array
,
Array::is_inline_array
, or Array::is_union_array
.
Arrays that contain integers or floats are examples of inline arrays. Their data is stored as
an array that contains numbers of the appropriate type, for example an array of Float32
s in
Julia is backed by an an array of f32
s. The data in these arrays can be accessed with
Array::inline_data
and Array::inline_data_mut
, and copied from Julia to Rust with
Array::copy_inline_data
. In order to call these methods the type of the elements must be
provided, this type must implement ValidField
to ensure the layouts in Rust and Julia are
compatible.
If the data isn’t inlined, e.g. because it’s mutable, each element is stored as a Value
.
This data can be accessed using Array::value_data
and Array::value_data_mut
.
Implementations
sourceimpl<'data> Array<'_, 'data>
impl<'data> Array<'_, 'data>
sourcepub fn new<'target, 'current, 'borrow, T, D, S>(
target: ExtendedTarget<'target, 'current, 'borrow, S>,
dims: D
) -> ArrayResult<'target, 'static, S>where
T: IntoJulia,
D: Dims,
S: Target<'target>,
pub fn new<'target, 'current, 'borrow, T, D, S>(
target: ExtendedTarget<'target, 'current, 'borrow, S>,
dims: D
) -> ArrayResult<'target, 'static, S>where
T: IntoJulia,
D: Dims,
S: Target<'target>,
Allocate a new n-dimensional Julia array of dimensions dims
for data of type T
.
This method can only be used in combination with types that implement IntoJulia
. If you
want to create an array for a type that doesn’t implement this trait you must use
Array::new_for
.
If the array size is too large, Julia will throw an error. This error is caught and returned.
sourcepub unsafe fn new_unchecked<'target, 'current, 'borrow, T, D, S>(
target: ExtendedTarget<'target, 'current, 'borrow, S>,
dims: D
) -> ArrayData<'target, 'static, S>where
T: IntoJulia,
D: Dims,
S: Target<'target>,
pub unsafe fn new_unchecked<'target, 'current, 'borrow, T, D, S>(
target: ExtendedTarget<'target, 'current, 'borrow, S>,
dims: D
) -> ArrayData<'target, 'static, S>where
T: IntoJulia,
D: Dims,
S: Target<'target>,
Allocate a new n-dimensional Julia array of dimensions dims
for data of type T
.
This method is equivalent to Array::new
except that Julia exceptions are not caught.
Safety: If the array size is too large, Julia will throw an error. This error is not
caught, which is UB from a ccall
ed function.
sourcepub fn new_for<'target, 'current, 'borrow, D, S>(
target: ExtendedTarget<'target, 'current, 'borrow, S>,
dims: D,
ty: Value<'_, '_>
) -> ArrayResult<'target, 'static, S>where
D: Dims,
S: Target<'target>,
pub fn new_for<'target, 'current, 'borrow, D, S>(
target: ExtendedTarget<'target, 'current, 'borrow, S>,
dims: D,
ty: Value<'_, '_>
) -> ArrayResult<'target, 'static, S>where
D: Dims,
S: Target<'target>,
Allocate a new n-dimensional Julia array of dimensions dims
for data of type ty
.
The elementy type, ty must be a
Union,
UnionAllor
DataType`.
If the array size is too large or if the type is invalid, Julia will throw an error. This error is caught and returned.
sourcepub unsafe fn new_for_unchecked<'target, 'current, 'borrow, D, S>(
target: ExtendedTarget<'target, 'current, 'borrow, S>,
dims: D,
ty: Value<'_, '_>
) -> ArrayData<'target, 'static, S>where
D: Dims,
S: Target<'target>,
pub unsafe fn new_for_unchecked<'target, 'current, 'borrow, D, S>(
target: ExtendedTarget<'target, 'current, 'borrow, S>,
dims: D,
ty: Value<'_, '_>
) -> ArrayData<'target, 'static, S>where
D: Dims,
S: Target<'target>,
Allocate a new n-dimensional Julia array of dimensions dims
for data of type T
.
This method is equivalent to Array::new_for
except that Julia exceptions are not
caught.
Safety: If the array size is too large or if the type is invalid, Julia will throw an
error. This error is not caught, which is UB from a ccall
ed function.
sourcepub fn from_slice<'target: 'current, 'current: 'borrow, 'borrow, T, D, S>(
target: ExtendedTarget<'target, 'current, 'borrow, S>,
data: &'data mut [T],
dims: D
) -> JlrsResult<ArrayResult<'target, 'data, S>>where
T: IntoJulia,
D: Dims,
S: Target<'target>,
pub fn from_slice<'target: 'current, 'current: 'borrow, 'borrow, T, D, S>(
target: ExtendedTarget<'target, 'current, 'borrow, S>,
data: &'data mut [T],
dims: D
) -> JlrsResult<ArrayResult<'target, 'data, S>>where
T: IntoJulia,
D: Dims,
S: Target<'target>,
Create a new n-dimensional Julia array of dimensions dims
that borrows data from Rust.
This method can only be used in combination with types that implement IntoJulia
. Because
the data is borrowed from Rust, operations that can change the size of the array (e.g.
push!
) will fail.
If the array size is too large, Julia will throw an error. This error is caught and returned.
sourcepub unsafe fn from_slice_unchecked<'target, 'current, 'borrow, T, D, S>(
target: ExtendedTarget<'target, 'current, 'borrow, S>,
data: &'data mut [T],
dims: D
) -> JlrsResult<ArrayData<'target, 'data, S>>where
T: IntoJulia,
D: Dims,
S: Target<'target>,
pub unsafe fn from_slice_unchecked<'target, 'current, 'borrow, T, D, S>(
target: ExtendedTarget<'target, 'current, 'borrow, S>,
data: &'data mut [T],
dims: D
) -> JlrsResult<ArrayData<'target, 'data, S>>where
T: IntoJulia,
D: Dims,
S: Target<'target>,
Create a new n-dimensional Julia array of dimensions dims
that borrows data from Rust.
This method can only be used in combination with types that implement IntoJulia
. Because
the data is borrowed from Rust, operations that can change the size of the array (e.g.
push!
) will fail.
Safety: If the array size is too large, Julia will throw an error. This error is not
caught, which is UB from a ccall
ed function.
sourcepub fn from_vec<'target, 'current, 'borrow, T, D, S>(
target: ExtendedTarget<'target, 'current, 'borrow, S>,
data: Vec<T>,
dims: D
) -> JlrsResult<ArrayResult<'target, 'static, S>>where
T: IntoJulia,
D: Dims,
S: Target<'target>,
pub fn from_vec<'target, 'current, 'borrow, T, D, S>(
target: ExtendedTarget<'target, 'current, 'borrow, S>,
data: Vec<T>,
dims: D
) -> JlrsResult<ArrayResult<'target, 'static, S>>where
T: IntoJulia,
D: Dims,
S: Target<'target>,
Create a new n-dimensional Julia array of dimensions dims
that takes ownership of Rust
data.
This method can only be used in combination with types that implement IntoJulia
. Because
the data is allocated by Rust, operations that can change the size of the array (e.g.
push!
) will fail.
If the array size is too large, Julia will throw an error. This error is caught and returned.
sourcepub unsafe fn from_vec_unchecked<'target, 'current, 'borrow, T, D, S>(
target: ExtendedTarget<'target, 'current, 'borrow, S>,
data: Vec<T>,
dims: D
) -> JlrsResult<ArrayData<'target, 'static, S>>where
T: IntoJulia,
D: Dims,
S: Target<'target>,
pub unsafe fn from_vec_unchecked<'target, 'current, 'borrow, T, D, S>(
target: ExtendedTarget<'target, 'current, 'borrow, S>,
data: Vec<T>,
dims: D
) -> JlrsResult<ArrayData<'target, 'static, S>>where
T: IntoJulia,
D: Dims,
S: Target<'target>,
Create a new n-dimensional Julia array of dimensions dims
that takes ownership of Rust
data.
This method can only be used in combination with types that implement IntoJulia
. Because
the data is allocated by Rust, operations that can change the size of the array (e.g.
push!
) will fail.
Safety: If the array size is too large, Julia will throw an error. This error is not
caught, which is UB from a ccall
ed function.
sourceimpl<'scope, 'data> Array<'scope, 'data>
impl<'scope, 'data> Array<'scope, 'data>
sourcepub unsafe fn dimensions(self) -> ArrayDimensions<'scope>
pub unsafe fn dimensions(self) -> ArrayDimensions<'scope>
Returns the array’s dimensions. TODO safety
sourcepub fn element_type(self) -> Value<'scope, 'static>
pub fn element_type(self) -> Value<'scope, 'static>
Returns the type of this array’s elements.
sourcepub fn element_size(self) -> usize
pub fn element_size(self) -> usize
Returns the size of this array’s elements.
sourcepub fn contains<T: ValidField>(self) -> bool
pub fn contains<T: ValidField>(self) -> bool
Returns true
if the layout of the elements is compatible with T
.
sourcepub fn contains_inline<T: ValidField>(self) -> bool
pub fn contains_inline<T: ValidField>(self) -> bool
Returns true
if the layout of the elements is compatible with T
and these elements are
stored inline.
sourcepub fn is_inline_array(self) -> bool
pub fn is_inline_array(self) -> bool
Returns true
if the elements of the array are stored inline.
sourcepub fn is_union_array(self) -> bool
pub fn is_union_array(self) -> bool
Returns true
if the elements of the array are stored inline and the element type is a
union type.
sourcepub fn has_inlined_pointers(self) -> bool
pub fn has_inlined_pointers(self) -> bool
Returns true if the elements of the array are stored inline and at least one of the fields of the inlined type is a pointer.
sourcepub fn is_value_array(self) -> bool
pub fn is_value_array(self) -> bool
Returns true if the elements of the array are stored as Value
s.
sourcepub fn try_as_typed<T>(self) -> JlrsResult<TypedArray<'scope, 'data, T>>where
T: ValidField,
pub fn try_as_typed<T>(self) -> JlrsResult<TypedArray<'scope, 'data, T>>where
T: ValidField,
Convert this untyped array to a TypedArray
.
sourcepub unsafe fn as_typed_unchecked<T>(self) -> TypedArray<'scope, 'data, T>where
T: ValidField,
pub unsafe fn as_typed_unchecked<T>(self) -> TypedArray<'scope, 'data, T>where
T: ValidField,
Convert this untyped array to a TypedArray
without checking if this conversion is
valid.
Safety: T
must be a valid representation of the data stored in the array.
sourcepub unsafe fn copy_inline_data<T>(&self) -> JlrsResult<CopiedArray<T>>where
T: 'static + ValidField,
pub unsafe fn copy_inline_data<T>(&self) -> JlrsResult<CopiedArray<T>>where
T: 'static + ValidField,
Copy the data of an inline array to Rust.
Returns ArrayLayoutError::NotInline
if the data is not stored inline or AccessError::InvalidLayout
if the type of the elements is incorrect.
pub unsafe fn bits_data<'borrow, T>(
&'borrow self
) -> JlrsResult<BitsArrayAccessorI<'borrow, 'scope, 'data, T>>where
T: ValidField,
sourcepub unsafe fn bits_data_mut<'borrow, T>(
&'borrow mut self
) -> JlrsResult<BitsArrayAccessorMut<'borrow, 'scope, 'data, T>>where
T: ValidField,
pub unsafe fn bits_data_mut<'borrow, T>(
&'borrow mut self
) -> JlrsResult<BitsArrayAccessorMut<'borrow, 'scope, 'data, T>>where
T: ValidField,
Mutably access the contents of this array. The elements must have an isbits
type.
This method can be used to gain mutable access to the contents of a single array.
Returns ArrayLayoutError::NotInline
if the data is not stored inline, ArrayLayoutError::NotBits
if the type is not an isbits
type, or AccessError::InvalidLayout
if T
is not a valid
layout for the array elements.
Safety: Mutating Julia data is generally unsafe because it can’t be guaranteed mutating this value is allowed.
sourcepub unsafe fn inline_data<'borrow, T>(
&'borrow self
) -> JlrsResult<InlinePtrArrayAccessorI<'borrow, 'scope, 'data, T>>where
T: ValidField,
pub unsafe fn inline_data<'borrow, T>(
&'borrow self
) -> JlrsResult<InlinePtrArrayAccessorI<'borrow, 'scope, 'data, T>>where
T: ValidField,
Immutably the contents of this array. The elements must be stored inline.
You can borrow data from multiple arrays at the same time.
Returns ArrayLayoutError::NotInline
if the data is not stored inline or
AccessError::InvalidLayout
if T
is not a valid layout for the array elements.
sourcepub unsafe fn inline_data_mut<'borrow, T>(
&'borrow mut self
) -> JlrsResult<InlinePtrArrayAccessorMut<'borrow, 'scope, 'data, T>>where
T: ValidField,
pub unsafe fn inline_data_mut<'borrow, T>(
&'borrow mut self
) -> JlrsResult<InlinePtrArrayAccessorMut<'borrow, 'scope, 'data, T>>where
T: ValidField,
Mutably access the contents of this array. The elements must be stored inline.
This method can be used to gain mutable access to the contents of a single array.
Returns ArrayLayoutError::NotInline
if the data is not stored inline or
AccessError::InvalidLayout
if T
is not a valid layout for the array elements.
Safety: Mutating Julia data is generally unsafe because it can’t be guaranteed mutating this value is allowed.
sourcepub unsafe fn wrapper_data<'borrow, T>(
&'borrow self
) -> JlrsResult<PtrArrayAccessorI<'borrow, 'scope, 'data, T>>where
T: WrapperRef<'scope, 'data>,
Option<T>: ValidField,
pub unsafe fn wrapper_data<'borrow, T>(
&'borrow self
) -> JlrsResult<PtrArrayAccessorI<'borrow, 'scope, 'data, T>>where
T: WrapperRef<'scope, 'data>,
Option<T>: ValidField,
Immutably the contents of this array. The elements must not be stored inline.
You can borrow data from multiple arrays at the same time.
Returns ArrayLayoutError::NotPointer
if the data is stored inline or AccessError::InvalidLayout
if T
is not a valid layout for the array elements.
sourcepub unsafe fn wrapper_data_mut<'borrow, T>(
&'borrow mut self
) -> JlrsResult<PtrArrayAccessorMut<'borrow, 'scope, 'data, T>>where
T: WrapperRef<'scope, 'data>,
Option<T>: ValidField,
pub unsafe fn wrapper_data_mut<'borrow, T>(
&'borrow mut self
) -> JlrsResult<PtrArrayAccessorMut<'borrow, 'scope, 'data, T>>where
T: WrapperRef<'scope, 'data>,
Option<T>: ValidField,
Mutably access the contents of this array. The elements must not be stored inline.
This method can be used to gain mutable access to the contents of a single array.
Returns ArrayLayoutError::NotPointer
if the data is stored inline or AccessError::InvalidLayout
if T
is not a valid layout for the array elements.
Safety: Mutating Julia data is generally unsafe because it can’t be guaranteed mutating this value is allowed.
sourcepub unsafe fn value_data<'borrow>(
&'borrow self
) -> JlrsResult<PtrArrayAccessorI<'borrow, 'scope, 'data, ValueRef<'scope, 'data>>>
pub unsafe fn value_data<'borrow>(
&'borrow self
) -> JlrsResult<PtrArrayAccessorI<'borrow, 'scope, 'data, ValueRef<'scope, 'data>>>
Immutably the contents of this array. The elements must not be stored inline.
You can borrow data from multiple arrays at the same time.
Returns ArrayLayoutError::NotPointer
if the data is stored inline.
sourcepub unsafe fn value_data_mut<'borrow>(
&'borrow mut self
) -> JlrsResult<PtrArrayAccessorMut<'borrow, 'scope, 'data, ValueRef<'scope, 'data>>>
pub unsafe fn value_data_mut<'borrow>(
&'borrow mut self
) -> JlrsResult<PtrArrayAccessorMut<'borrow, 'scope, 'data, ValueRef<'scope, 'data>>>
Mutably access the contents of this array. The elements must not be stored inline.
This method can be used to gain mutable access to the contents of a single array.
Returns ArrayLayoutError::NotPointer
if the data is stored inline.
Safety: Mutating Julia data is generally unsafe because it can’t be guaranteed mutating this value is allowed.
sourcepub unsafe fn union_data<'borrow>(
&'borrow self
) -> JlrsResult<UnionArrayAccessorI<'borrow, 'scope, 'data>>
pub unsafe fn union_data<'borrow>(
&'borrow self
) -> JlrsResult<UnionArrayAccessorI<'borrow, 'scope, 'data>>
Immutably access the contents of this array. The element type must be a bits union type.
You can borrow data from multiple arrays at the same time.
Returns ArrayLayoutError::NotUnion
if the data is not stored as a bits union.
sourcepub unsafe fn union_data_mut<'borrow>(
&'borrow mut self
) -> JlrsResult<UnionArrayAccessorMut<'borrow, 'scope, 'data>>
pub unsafe fn union_data_mut<'borrow>(
&'borrow mut self
) -> JlrsResult<UnionArrayAccessorMut<'borrow, 'scope, 'data>>
Mutably access the contents of this array. The element type must be a bits union.
This method can be used to gain mutable access to the contents of a single array.
Returns ArrayLayoutError::NotUnion
if the data is not stored as a bits union.
Safety: Mutating Julia data is generally unsafe because it can’t be guaranteed mutating this value is allowed.
sourcepub unsafe fn indeterminate_data<'borrow>(
&'borrow self
) -> IndeterminateArrayAccessorI<'borrow, 'scope, 'data>
pub unsafe fn indeterminate_data<'borrow>(
&'borrow self
) -> IndeterminateArrayAccessorI<'borrow, 'scope, 'data>
Immutably access the contents of this array.
You can borrow data from multiple arrays at the same time.
sourcepub unsafe fn indeterminate_data_mut<'borrow>(
&'borrow mut self
) -> IndeterminateArrayAccessor<'borrow, 'scope, 'data, Mutable<'borrow, u8>>
pub unsafe fn indeterminate_data_mut<'borrow>(
&'borrow mut self
) -> IndeterminateArrayAccessor<'borrow, 'scope, 'data, Mutable<'borrow, u8>>
Mutably access the contents of this array.
This method can be used to gain mutable access to the contents of a single array.
Safety: Mutating Julia data is generally unsafe because it can’t be guaranteed mutating this value is allowed.
sourcepub unsafe fn reshape<'target, 'current, 'borrow, D, S>(
&self,
target: ExtendedTarget<'target, 'current, 'borrow, S>,
dims: D
) -> ArrayResult<'target, 'data, S>where
D: Dims,
S: Target<'target>,
pub unsafe fn reshape<'target, 'current, 'borrow, D, S>(
&self,
target: ExtendedTarget<'target, 'current, 'borrow, S>,
dims: D
) -> ArrayResult<'target, 'data, S>where
D: Dims,
S: Target<'target>,
Reshape the array, a new array is returned that has dimensions dims
. The new array and
self
share their data.
This method returns an exception if the old and new array have a different number of elements.
sourcepub unsafe fn reshape_unchecked<'target, 'current, 'borrow, D, S>(
&self,
target: ExtendedTarget<'target, 'current, 'borrow, S>,
dims: D
) -> ArrayData<'target, 'data, S>where
D: Dims,
S: Target<'target>,
pub unsafe fn reshape_unchecked<'target, 'current, 'borrow, D, S>(
&self,
target: ExtendedTarget<'target, 'current, 'borrow, S>,
dims: D
) -> ArrayData<'target, 'data, S>where
D: Dims,
S: Target<'target>,
Reshape the array, a new array is returned that has dimensions dims
. The new array and
self
share their data.
Safety: If the dimensions are incompatible with the array size, Julia will throw an error.
This error is not caught, which is UB from a ccall
ed function.
sourceimpl<'scope> Array<'scope, 'static>
impl<'scope> Array<'scope, 'static>
sourcepub unsafe fn grow_end<'target, S>(
&mut self,
target: S,
inc: usize
) -> S::Exception<'static, ()>where
S: Target<'target>,
pub unsafe fn grow_end<'target, S>(
&mut self,
target: S,
inc: usize
) -> S::Exception<'static, ()>where
S: Target<'target>,
Insert inc
elements at the end of the array.
The array must be 1D and not contain data borrowed or moved from Rust, otherwise an exception is returned.
sourcepub unsafe fn grow_end_unchecked(&mut self, inc: usize)
pub unsafe fn grow_end_unchecked(&mut self, inc: usize)
Insert inc
elements at the end of the array.
Safety: the array must be 1D and not contain data borrowed or moved from Rust, otherwise
Julia throws an exception. This error is not exception, which is UB from a ccall
ed
function.
sourcepub unsafe fn del_end<'target, S>(
&mut self,
target: S,
dec: usize
) -> S::Exception<'static, ()>where
S: Target<'target>,
pub unsafe fn del_end<'target, S>(
&mut self,
target: S,
dec: usize
) -> S::Exception<'static, ()>where
S: Target<'target>,
Remove dec
elements from the end of the array.
The array must be 1D, not contain data borrowed or moved from Rust, otherwise an exception is returned.
sourcepub unsafe fn del_end_unchecked(&mut self, dec: usize)
pub unsafe fn del_end_unchecked(&mut self, dec: usize)
Remove dec
elements from the end of the array.
Safety: the array must be 1D and not contain data borrowed or moved from Rust, otherwise
Julia throws an exception. This error is not exception, which is UB from a ccall
ed
function.
sourcepub unsafe fn grow_begin<'target, S>(
&mut self,
target: S,
inc: usize
) -> S::Exception<'static, ()>where
S: Target<'target>,
pub unsafe fn grow_begin<'target, S>(
&mut self,
target: S,
inc: usize
) -> S::Exception<'static, ()>where
S: Target<'target>,
Insert inc
elements at the beginning of the array.
The array must be 1D, not contain data borrowed or moved from Rust, otherwise an exception is returned.
sourcepub unsafe fn grow_begin_unchecked(&mut self, inc: usize)
pub unsafe fn grow_begin_unchecked(&mut self, inc: usize)
Insert inc
elements at the beginning of the array.
Safety: the array must be 1D and not contain data borrowed or moved from Rust, otherwise
Julia throws an exception. This error is not exception, which is UB from a ccall
ed
function.
sourcepub unsafe fn del_begin<'target, S>(
&mut self,
target: S,
dec: usize
) -> S::Exception<'static, ()>where
S: Target<'target>,
pub unsafe fn del_begin<'target, S>(
&mut self,
target: S,
dec: usize
) -> S::Exception<'static, ()>where
S: Target<'target>,
Remove dec
elements from the beginning of the array.
The array must be 1D, not contain data borrowed or moved from Rust, otherwise an exception is returned.
sourcepub unsafe fn del_begin_unchecked(&mut self, dec: usize)
pub unsafe fn del_begin_unchecked(&mut self, dec: usize)
Remove dec
elements from the beginning of the array.
Safety: the array must be 1D and not contain data borrowed or moved from Rust, otherwise
Julia throws an exception. This error is not exception, which is UB from a ccall
ed
function.
Trait Implementations
sourceimpl<'scope, 'data> ArrayWrapper<'scope, 'data> for Array<'scope, 'data>
impl<'scope, 'data> ArrayWrapper<'scope, 'data> for Array<'scope, 'data>
fn track<'borrow>(
&'borrow self
) -> JlrsResult<TrackedArray<'borrow, 'scope, 'data, Self>>
fn track_mut<'borrow>(
&'borrow mut self
) -> JlrsResult<TrackedArrayMut<'borrow, 'scope, 'data, Self>>
fn data_range(&self) -> Range<*const u8>
impl<'scope, 'data> Copy for Array<'scope, 'data>
Auto Trait Implementations
impl<'scope, 'data> RefUnwindSafe for Array<'scope, 'data>
impl<'scope, 'data> !Send for Array<'scope, 'data>
impl<'scope, 'data> !Sync for Array<'scope, 'data>
impl<'scope, 'data> Unpin for Array<'scope, 'data>
impl<'scope, 'data> !UnwindSafe for Array<'scope, 'data>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<T> FmtForward for T
impl<T> FmtForward for T
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self
to use its Binary
implementation when Debug
-formatted.fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self
to use its Octal
implementation when Debug
-formatted.fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read morefn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read morefn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere
Self: Borrow<B>,
B: 'a + ?Sized,
R: 'a,
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere
Self: Borrow<B>,
B: 'a + ?Sized,
R: 'a,
fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R
) -> Rwhere
Self: BorrowMut<B>,
B: 'a + ?Sized,
R: 'a,
fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R
) -> Rwhere
Self: BorrowMut<B>,
B: 'a + ?Sized,
R: 'a,
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere
Self: AsRef<U>,
U: 'a + ?Sized,
R: 'a,
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere
Self: AsRef<U>,
U: 'a + ?Sized,
R: 'a,
self
, then passes self.as_ref()
into the pipe function.fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere
Self: AsMut<U>,
U: 'a + ?Sized,
R: 'a,
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere
Self: AsMut<U>,
U: 'a + ?Sized,
R: 'a,
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> Rwhere
Self: Deref<Target = T>,
T: 'a + ?Sized,
R: 'a,
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> Rwhere
Self: Deref<Target = T>,
T: 'a + ?Sized,
R: 'a,
self
, then passes self.deref()
into the pipe function.impl<T> Tap for T
impl<T> Tap for T
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere
Self: Borrow<B>,
B: ?Sized,
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere
Self: Borrow<B>,
B: ?Sized,
Borrow<B>
of a value. Read morefn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere
Self: BorrowMut<B>,
B: ?Sized,
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere
Self: BorrowMut<B>,
B: ?Sized,
BorrowMut<B>
of a value. Read morefn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere
Self: AsRef<R>,
R: ?Sized,
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere
Self: AsRef<R>,
R: ?Sized,
AsRef<R>
view of a value. Read morefn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere
Self: AsMut<R>,
R: ?Sized,
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere
Self: AsMut<R>,
R: ?Sized,
AsMut<R>
view of a value. Read morefn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere
Self: Deref<Target = T>,
T: ?Sized,
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere
Self: Deref<Target = T>,
T: ?Sized,
Deref::Target
of a value. Read morefn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere
Self: DerefMut<Target = T> + Deref,
T: ?Sized,
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere
Self: DerefMut<Target = T> + Deref,
T: ?Sized,
Deref::Target
of a value. Read morefn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap()
only in debug builds, and is erased in release builds.fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut()
only in debug builds, and is erased in release
builds. Read morefn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere
Self: Borrow<B>,
B: ?Sized,
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere
Self: Borrow<B>,
B: ?Sized,
.tap_borrow()
only in debug builds, and is erased in release
builds. Read morefn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere
Self: BorrowMut<B>,
B: ?Sized,
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere
Self: BorrowMut<B>,
B: ?Sized,
.tap_borrow_mut()
only in debug builds, and is erased in release
builds. Read morefn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere
Self: AsRef<R>,
R: ?Sized,
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere
Self: AsRef<R>,
R: ?Sized,
.tap_ref()
only in debug builds, and is erased in release
builds. Read morefn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere
Self: AsMut<R>,
R: ?Sized,
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere
Self: AsMut<R>,
R: ?Sized,
.tap_ref_mut()
only in debug builds, and is erased in release
builds. Read moresourceimpl<'scope, 'data, W> Wrapper<'scope, 'data> for Wwhere
W: WrapperPriv<'scope, 'data>,
impl<'scope, 'data, W> Wrapper<'scope, 'data> for Wwhere
W: WrapperPriv<'scope, 'data>,
type TypeConstructor = <W as WrapperPriv<'scope, 'data>>::TypeConstructorPriv<'target, 'da>
type TypeConstructor = <W as WrapperPriv<'scope, 'data>>::TypeConstructorPriv<'target, 'da>
Self
, but with arbitrary lifetimes. Used to construct the appropriate type in generic
contexts. Read moresourcefn root<'target, T>(
self,
target: T
) -> T::Data<'data, Self::TypeConstructor<'target, 'data>>where
T: Target<'target>,
fn root<'target, T>(
self,
target: T
) -> T::Data<'data, Self::TypeConstructor<'target, 'data>>where
T: Target<'target>,
sourcefn unrooted_target(self) -> Unrooted<'scope>
fn unrooted_target(self) -> Unrooted<'scope>
Unrooted
.sourcefn display_string(self) -> JlrsResult<String>
fn display_string(self) -> JlrsResult<String>
Base.show
. Read moresourcefn error_string(self) -> JlrsResult<String>
fn error_string(self) -> JlrsResult<String>
Base.showerror
. This string can contain ANSI color codes if this is enabled by calling
Julia::error_color
, AsyncJulia::error_color
, or AsyncJulia::try_error_color
, . Read more