#[repr(transparent)]pub struct Value<'scope, 'data>(_, _, _);
Expand description
Arbitrary Julia data.
A Value
is essentially a non-null pointer to some data owned by the Julia garbage
collector with two lifetimes: 'scope
and 'data
. The first of these ensures that a
Value
can only be used while it’s rooted, the second accounts for data borrowed from Rust.
The only way to borrow data from Rust is to create an Julia array that borrows its contents
by calling Array::from_slice
; if a Julia function is called with such an array as an
argument the result will inherit the second lifetime of the borrowed data to ensure that
such a Value
can only be used while the borrow is active.
See the [module-level documentation] for more information.
Implementations§
source§impl Value<'_, '_>
impl Value<'_, '_>
Create new Value
s
Several methods are available to create new values. The simplest of these is Value::new
,
which can be used to convert relatively simple data from Rust to Julia. Data that can be
converted this way must implement IntoJulia
, which is the case for types like the
primitive number types. This trait is also automatically derived by JlrsReflect.jl for types
that are trivially guaranteed to be bits-types: the type must have no type parameters, no
unions, and all fields must be immutable bits-types themselves.
sourcepub fn new<'target, V, Tgt>(
target: Tgt,
value: V
) -> ValueData<'target, 'static, Tgt>where
V: IntoJulia,
Tgt: Target<'target>,
pub fn new<'target, V, Tgt>( target: Tgt, value: V ) -> ValueData<'target, 'static, Tgt>where V: IntoJulia, Tgt: Target<'target>,
Create a new Julia value, any type that implements IntoJulia
can be converted using
this function.
sourcepub fn new_bits<'target, T, Tgt>(
target: Tgt,
layout: T
) -> ValueData<'target, 'static, Tgt>where
T: ConstructType + ValidLayout + IsBits,
Tgt: Target<'target>,
pub fn new_bits<'target, T, Tgt>( target: Tgt, layout: T ) -> ValueData<'target, 'static, Tgt>where T: ConstructType + ValidLayout + IsBits, Tgt: Target<'target>,
Create a new Julia value, any type that implements IsBits
can be converted using
this function.
sourcepub fn new_bits_from_layout<'target, T, Tgt>(
target: Tgt,
layout: T::Layout
) -> JlrsResult<ValueData<'target, 'static, Tgt>>where
T: HasLayout<'target, 'static>,
T::Layout: IsBits,
Tgt: Target<'target>,
pub fn new_bits_from_layout<'target, T, Tgt>( target: Tgt, layout: T::Layout ) -> JlrsResult<ValueData<'target, 'static, Tgt>>where T: HasLayout<'target, 'static>, T::Layout: IsBits, Tgt: Target<'target>,
Create a new Julia value using T
to construct the type. The layout must implement
IsBits
.
sourcepub fn new_bits_with_type<'target, T, L, Tgt>(
target: Tgt,
layout: L
) -> JlrsResult<ValueData<'target, 'static, Tgt>>where
T: ConstructType,
L: IsBits + ValidLayout,
Tgt: Target<'target>,
pub fn new_bits_with_type<'target, T, L, Tgt>( target: Tgt, layout: L ) -> JlrsResult<ValueData<'target, 'static, Tgt>>where T: ConstructType, L: IsBits + ValidLayout, Tgt: Target<'target>,
Create a new Julia value using T
to construct the type and an arbitrary layout L
.
If the layout is not valid for T
TypeError::InvalidLayout
is returned.
sourcepub unsafe fn try_new_with<'target, Ty, L, Tgt>(
target: Tgt,
layout: L
) -> JlrsResult<ValueData<'target, 'static, Tgt>>where
Ty: ConstructType,
L: ValidLayout,
Tgt: Target<'target>,
pub unsafe fn try_new_with<'target, Ty, L, Tgt>( target: Tgt, layout: L ) -> JlrsResult<ValueData<'target, 'static, Tgt>>where Ty: ConstructType, L: ValidLayout, Tgt: Target<'target>,
Create a new Value
from the provided layout and type constructor.
This is a more powerful version of Value::new
. While that method is limited to types
that implement IntoJulia
, this method can create instances of any constructible type by
providing a layout which is compatible with that type.
This method returns an error if L
is not a valid layout for V
.
Safety:
If the layout contains references to Julia data, those fields must either be None
or
point to valid data.
sourcepub fn new_named_tuple<'target, 'value, 'data, Tgt, const N: usize>(
target: Tgt,
pairs: &[(Symbol<'value>, Value<'value, 'data>); N]
) -> ValueData<'target, 'data, Tgt>where
Tgt: Target<'target>,
pub fn new_named_tuple<'target, 'value, 'data, Tgt, const N: usize>( target: Tgt, pairs: &[(Symbol<'value>, Value<'value, 'data>); N] ) -> ValueData<'target, 'data, Tgt>where Tgt: Target<'target>,
Create a new named tuple, you should use the named_tuple
macro rather than this method.
sourcepub fn apply_type<'target, 'value, 'data, V, T>(
self,
target: T,
types: V
) -> ValueResult<'target, 'data, T>where
T: Target<'target>,
V: AsRef<[Value<'value, 'data>]>,
pub fn apply_type<'target, 'value, 'data, V, T>( self, target: T, types: V ) -> ValueResult<'target, 'data, T>where T: Target<'target>, V: AsRef<[Value<'value, 'data>]>,
Apply the given types to self
.
If self
is the DataType
anytuple_type
, calling this method will return a new
tuple type with the given types as its field types. If it is the DataType
uniontype_type
, calling this method is equivalent to calling Union::new
. If
the value is a UnionAll
, the given types will be applied and the resulting type is
returned.
If the types can’t be applied to self
this methods catches and returns the exception.
sourcepub unsafe fn apply_type_unchecked<'target, 'value, 'data, T, V>(
self,
target: T,
types: V
) -> ValueData<'target, 'data, T>where
T: Target<'target>,
V: AsRef<[Value<'value, 'data>]>,
pub unsafe fn apply_type_unchecked<'target, 'value, 'data, T, V>( self, target: T, types: V ) -> ValueData<'target, 'data, T>where T: Target<'target>, V: AsRef<[Value<'value, 'data>]>,
Apply the given types to self
.
If self
is the DataType
anytuple_type
, calling this method will return a new
tuple type with the given types as its field types. If it is the DataType
uniontype_type
, calling this method is equivalent to calling Union::new
. If
the value is a UnionAll
, the given types will be applied and the resulting type is
returned.
If an exception is thrown it isn’t caught
Safety: an exception must not be thrown if this method is called from a ccall
ed
function.
source§impl<'scope, 'data> Value<'scope, 'data>
impl<'scope, 'data> Value<'scope, 'data>
Type information
Every value is guaranteed to have a DataType
. This contains all of the value’s type
information.
sourcepub fn datatype_name(self) -> JlrsResult<&'scope str>
pub fn datatype_name(self) -> JlrsResult<&'scope str>
Returns the name of this value’s DataType
as a string slice.
source§impl Value<'_, '_>
impl Value<'_, '_>
Type checking
Many properties of Julia types can be checked, including whether instances of the type are
mutable, if the value is an array, and so on. The method Value::is
can be used to perform
these checks. All these checks implement the Typecheck
trait. If the type that implements
this trait also implements ValidLayout
, the typecheck indicates whether or not the value
can be cast to or unboxed as that type.
sourcepub fn is<T: Typecheck>(self) -> bool
pub fn is<T: Typecheck>(self) -> bool
Performs the given typecheck:
julia
.scope(|mut frame| {
let i = Value::new(&mut frame, 2u64);
assert!(i.is::<u64>());
Ok(())
})
.unwrap();
A full list of supported checks can be found here.
sourcepub fn is_array_of<T: ValidField>(self) -> bool
pub fn is_array_of<T: ValidField>(self) -> bool
Returns true if the value is an array with elements of type T
.
sourcepub fn is_kind(self) -> bool
pub fn is_kind(self) -> bool
Returns true if self
is the type of a DataType
, UnionAll
, Union
, or Union{}
(the
bottom type).
source§impl<'scope, 'data> Value<'scope, 'data>
impl<'scope, 'data> Value<'scope, 'data>
These methods let you track a Value
, while it’s tracked it’s internal pointer is
dereferenced and you can access its contents directly.
Tracking works with a ledger that’s shared between all active instances of jlrs. This ledger
contains a list of all active borrows, which lets it be used to prevent mutable aliasing.
Unfortunately, this system isn’t perfect, it’s unaware of how this data is used in Julia. It’s
your responsibility that you only try to access data which isn’t being used by some task
running in the background. The raw ledger API is available in JlrsCore.Ledger
, you can prevent
mutable access to data by tracking from Julia by calling these functions. If you do so, you
should use a finalizer to ensure the borrow is removed from the ledger when the data is
finalized.
Track self
immutably.
When this method is called on some Value
, it’s checked if the layout of T
matches
that of the data and if the data is already mutably borrowed from Rust. If it’s not, the
data is derefenced and returned as a Tracked
which provides direct access to the
reference.
If the data is immutable the borrow isn’t tracked by the ledger because it can’t be mutably borrowed.
sourcepub unsafe fn track_exclusive<'borrow, T: ValidLayout>(
&'borrow mut self
) -> JlrsResult<TrackedMut<'borrow, 'scope, 'data, T>>
pub unsafe fn track_exclusive<'borrow, T: ValidLayout>( &'borrow mut self ) -> JlrsResult<TrackedMut<'borrow, 'scope, 'data, T>>
Track self
exclusively.
When this method is called on some Value
, it’s checked if the layout of T
matches
that of the data and if the data is already borrowed from Rust. If it’s not, the data is
mutably derefenced and returned as a TrackedMut
which provides direct access to the
mutable reference.
Note that if T
contains any references to Julia data, if such a reference is mutated
through TrackedMut
you must call write_barrier
after mutating it. This ensures the
garbage collector remains aware of old-generation objects pointing to young-generation
objects.
In general, it’s recommended that only fields that contain no references to Julia data are
updated through TrackedMut
.
Safety:
This method can only track references that exist in Rust code. It also gives unrestricted mutable access to the contents of the data, which is inherently unsafe.
sourcepub fn is_tracked(self) -> JlrsResult<bool>
pub fn is_tracked(self) -> JlrsResult<bool>
Returns true
if self
is currently tracked.
Returns true
if self
is currently tracked.
sourcepub fn is_tracked_exclusive(self) -> JlrsResult<bool>
pub fn is_tracked_exclusive(self) -> JlrsResult<bool>
Returns true
if self
is currently mutably tracked.
source§impl Value<'static, 'static>
impl Value<'static, 'static>
Track self
immutably.
This method is equivalent to Value::track_shared
except it takes self
by value and
can only be used with ValueUnbound
. This is intended to be used from ccall
able
functions that take a Value
and operate on its contents in another thread.
Because T: Send
, it’s not possible to track types that contain references to Julia data.
Safety:
The returned instance of Tracked
must only be used in the ccall
ed function and the
AsyncCallback
.
sourcepub unsafe fn track_exclusive_unbound<T: ValidLayout + Send>(
self
) -> JlrsResult<TrackedMut<'static, 'static, 'static, T>>
pub unsafe fn track_exclusive_unbound<T: ValidLayout + Send>( self ) -> JlrsResult<TrackedMut<'static, 'static, 'static, T>>
Track self
exclusively.
This method is equivalent to Value::track_exclusive
except it takes self
by value
and can only be used with ValueUnbound
. This is intended to be used from ccall
able
functions that take a Value
and operate on its contents in another thread.
Because T: Send
, it’s not possible to track types that contain references to Julia data.
Safety:
The returned instance of TrackedMut
must only be used in the ccall
ed function and the
AsyncCallback
.
source§impl<'scope, 'data> Value<'scope, 'data>
impl<'scope, 'data> Value<'scope, 'data>
Lifetime management
Values have two lifetimes, 'scope
and 'data
. The first ensures that a value can only be
used while it’s rooted, the second ensures that values that (might) borrow array data from
Rust are also restricted by the lifetime of that borrow. This second restriction can be
relaxed with Value::assume_owned
if it doesn’t borrow any data from Rust.
sourcepub unsafe fn assume_owned(self) -> Value<'scope, 'static>
pub unsafe fn assume_owned(self) -> Value<'scope, 'static>
If you call a Julia function with one or more borrowed arrays as arguments, its result can
only be used when all the borrows are active. If this result doesn’t contain any borrowed
data this function can be used to relax its second lifetime to 'static
.
Safety: The value must not contain any data borrowed from Rust.
source§impl<'scope, 'data> Value<'scope, 'data>
impl<'scope, 'data> Value<'scope, 'data>
Conversions
There are two ways to convert a Value
to some other type. The first is casting, which is
used to convert a Value
to the appropriate managed type. For example, if the
Value
is a Julia array it can be cast to Array
. Because this only involves a pointer
cast it’s always possible to convert a managed type to a Value
by calling
Managed::as_value
. The second way is unboxing, which is used to copy the data the
Value
points to to Rust. If a Value
is a UInt8
, it can be unboxed as a u8
. By
default, jlrs can unbox the default primitive types and Julia strings, but the Unbox
trait
can be implemented for other types. It’s recommended that you use JlrsReflect.jl to do so.
Unlike casting, unboxing dereferences the pointer. As a result it loses its header, so an
unboxed value can’t be used as a Value
again without reallocating it.
sourcepub fn cast<T: Managed<'scope, 'data> + Typecheck>(self) -> JlrsResult<T>
pub fn cast<T: Managed<'scope, 'data> + Typecheck>(self) -> JlrsResult<T>
Cast the value to a managed type T
. Returns an error if the conversion is invalid.
sourcepub unsafe fn cast_unchecked<T: Managed<'scope, 'data>>(self) -> T
pub unsafe fn cast_unchecked<T: Managed<'scope, 'data>>(self) -> T
Cast the value to a managed type T
without checking if this conversion is valid.
Safety: You must guarantee self.is::<T>()
would have returned true
.
sourcepub fn unbox<T: Unbox + Typecheck>(self) -> JlrsResult<T::Output>
pub fn unbox<T: Unbox + Typecheck>(self) -> JlrsResult<T::Output>
Unbox the contents of the value as the output type associated with T
. Returns an error
if the layout of T::Output
is incompatible with the layout of the type in Julia.
sourcepub unsafe fn unbox_unchecked<T: Unbox>(self) -> T::Output
pub unsafe fn unbox_unchecked<T: Unbox>(self) -> T::Output
Unbox the contents of the value as the output type associated with T
without checking
if the layout of T::Output
is compatible with the layout of the type in Julia.
Safety: You must guarantee self.is::<T>()
would have returned true
.
sourcepub fn as_typed<'target, T: ConstructType, Tgt: Target<'target>>(
self,
target: &Tgt
) -> JlrsResult<TypedValue<'scope, 'data, T>>
pub fn as_typed<'target, T: ConstructType, Tgt: Target<'target>>( self, target: &Tgt ) -> JlrsResult<TypedValue<'scope, 'data, T>>
Convert this value to a typed value if this value is an instance of the constructed type.
sourcepub unsafe fn as_typed_unchecked<T: ConstructType>(
self
) -> TypedValue<'scope, 'data, T>
pub unsafe fn as_typed_unchecked<T: ConstructType>( self ) -> TypedValue<'scope, 'data, T>
Convert this value to a typed value without checking if the conversion is valid.
Safety: the converted value must be an instance of the constructed type.
source§impl<'scope, 'data> Value<'scope, 'data>
impl<'scope, 'data> Value<'scope, 'data>
Fields
Most Julia values have fields. For example, if the value is an instance of this struct:
struct Example
fielda
fieldb::UInt32
end
it will have two fields, fielda
and fieldb
. The first field is a pointer field, the second
is stored inline as a u32
. It’s possible to safely access the raw contents of these fields
with the method Value::field_accessor
. The first field can be accessed as a ValueRef
,
the second as a u32
.
sourcepub fn field_names(self) -> &'scope [Symbol<'scope>]
pub fn field_names(self) -> &'scope [Symbol<'scope>]
Returns the field names of this value as a slice of Symbol
s.
sourcepub fn field_accessor(self) -> FieldAccessor<'scope, 'data>
pub fn field_accessor(self) -> FieldAccessor<'scope, 'data>
Returns an accessor to access the contents of this value without allocating temporary Julia data.
sourcepub fn get_nth_field<'target, T>(
self,
target: T,
idx: usize
) -> JlrsResult<ValueData<'target, 'data, T>>where
T: Target<'target>,
pub fn get_nth_field<'target, T>( self, target: T, idx: usize ) -> JlrsResult<ValueData<'target, 'data, T>>where T: Target<'target>,
Roots the field at index idx
if it exists and returns it, or a
JlrsError::AccessError
if the index is out of bounds.
sourcepub fn get_nth_field_ref(
self,
idx: usize
) -> JlrsResult<ValueRef<'scope, 'data>>
pub fn get_nth_field_ref( self, idx: usize ) -> JlrsResult<ValueRef<'scope, 'data>>
Returns the field at index idx
if it’s a pointer field.
If the field doesn’t exist or if the field can’t be referenced because its data is stored
inline, a JlrsError::AccessError
is returned.
sourcepub fn get_field<'target, N, T>(
self,
target: T,
field_name: N
) -> JlrsResult<ValueData<'target, 'data, T>>where
N: ToSymbol,
T: Target<'target>,
pub fn get_field<'target, N, T>( self, target: T, field_name: N ) -> JlrsResult<ValueData<'target, 'data, T>>where N: ToSymbol, T: Target<'target>,
Roots the field with the name field_name
if it exists and returns it, or a
JlrsError::AccessError
if there’s no field with that name.
sourcepub fn get_field_ref<N>(
self,
field_name: N
) -> JlrsResult<Option<ValueRef<'scope, 'data>>>where
N: ToSymbol,
pub fn get_field_ref<N>( self, field_name: N ) -> JlrsResult<Option<ValueRef<'scope, 'data>>>where N: ToSymbol,
Returns the field with the name field_name
if it’s a pointer field.
If the field doesn’t exist or if the field can’t be referenced because its data is stored
inline, a JlrsError::AccessError
is returned.
sourcepub unsafe fn set_nth_field<'target, T>(
self,
target: T,
idx: usize,
value: Value<'_, 'data>
) -> JlrsResult<TargetException<'target, 'data, (), T>>where
T: Target<'target>,
pub unsafe fn set_nth_field<'target, T>( self, target: T, idx: usize, value: Value<'_, 'data> ) -> JlrsResult<TargetException<'target, 'data, (), T>>where T: Target<'target>,
Set the value of the field at idx
. If Julia throws an exception it’s caught, rooted in
the frame, and returned. If the index is out of bounds or the value is not a subtype of
the field an error is returned,
Safety: Mutating things that should absolutely not be mutated, like the fields of a
DataType
, is not prevented.
sourcepub unsafe fn set_nth_field_unchecked(self, idx: usize, value: Value<'_, 'data>)
pub unsafe fn set_nth_field_unchecked(self, idx: usize, value: Value<'_, 'data>)
Set the value of the field at idx
. If Julia throws an exception the process aborts.
Safety: this method doesn’t check if the type of the value is a subtype of the field’s
type. Mutating things that should absolutely not be mutated, like the fields of a
DataType
, is also not prevented.
sourcepub unsafe fn set_field<'target, N, T>(
self,
target: T,
field_name: N,
value: Value<'_, 'data>
) -> JlrsResult<TargetException<'target, 'data, (), T>>where
N: ToSymbol,
T: Target<'target>,
pub unsafe fn set_field<'target, N, T>( self, target: T, field_name: N, value: Value<'_, 'data> ) -> JlrsResult<TargetException<'target, 'data, (), T>>where N: ToSymbol, T: Target<'target>,
Set the value of the field with the name field_name
. If Julia throws an exception it’s
caught, rooted in the frame, and returned. If there’s no field with the given name or the
value is not a subtype of the field an error is returned.
Safety: Mutating things that should absolutely not be mutated, like the fields of a
DataType
, is not prevented.
sourcepub unsafe fn set_field_unchecked<N>(
self,
field_name: N,
value: Value<'_, 'data>
) -> JlrsResult<()>where
N: ToSymbol,
pub unsafe fn set_field_unchecked<N>( self, field_name: N, value: Value<'_, 'data> ) -> JlrsResult<()>where N: ToSymbol,
Set the value of the field with the name field_name
. If Julia throws an exception the
process aborts. If there’s no field with the given name an error is returned.
Safety: this method doesn’t check if the type of the value is a subtype of the field’s
type. Mutating things that should absolutely not be mutated, like the fields of a
DataType
, is also not prevented.
source§impl Value<'_, '_>
impl Value<'_, '_>
Evaluate Julia code
The easiest way to call Julia from Rust is by evaluating some Julia code directly. This can be used to call simple functions without any arguments provided from Rust and to execute using-statements.
sourcepub unsafe fn eval_string<'target, C, T>(
target: T,
cmd: C
) -> ValueResult<'target, 'static, T>where
C: AsRef<str>,
T: Target<'target>,
pub unsafe fn eval_string<'target, C, T>( target: T, cmd: C ) -> ValueResult<'target, 'static, T>where C: AsRef<str>, T: Target<'target>,
Execute a Julia command cmd
, for example Value::eval_string(&mut *frame, "sqrt(2)")
or
Value::eval_string(&mut *frame, "using LinearAlgebra")
.
Safety: The command can’t be checked for correctness, nothing prevents you from causing a
segmentation fault with a command like unsafe_load(Ptr{Float64}(C_NULL))
.
sourcepub unsafe fn eval_cstring<'target, C, T>(
target: T,
cmd: C
) -> ValueResult<'target, 'static, T>where
C: AsRef<CStr>,
T: Target<'target>,
pub unsafe fn eval_cstring<'target, C, T>( target: T, cmd: C ) -> ValueResult<'target, 'static, T>where C: AsRef<CStr>, T: Target<'target>,
Execute a Julia command cmd
. This is equivalent to Value::eval_string
, but uses a
null-terminated string.
Safety: The command can’t be checked for correctness, nothing prevents you from causing a
segmentation fault with a command like unsafe_load(Ptr{Float64}(C_NULL))
.
sourcepub unsafe fn include<'target, 'current, 'borrow, P, Tgt>(
target: Tgt,
path: P
) -> JlrsResult<ValueResult<'target, 'static, Tgt>>where
P: AsRef<Path>,
Tgt: Target<'target>,
pub unsafe fn include<'target, 'current, 'borrow, P, Tgt>( target: Tgt, path: P ) -> JlrsResult<ValueResult<'target, 'static, Tgt>>where P: AsRef<Path>, Tgt: Target<'target>,
Calls include
in the Main
module in Julia, which evaluates the file’s contents in that
module. This has the same effect as calling include
in the Julia REPL.
Safety: The content of the file can’t be checked for correctness, nothing prevents you
from causing a segmentation fault with code like unsafe_load(Ptr{Float64}(C_NULL))
.
source§impl Value<'_, '_>
impl Value<'_, '_>
sourcepub unsafe fn add_finalizer(self, f: Value<'_, 'static>)
pub unsafe fn add_finalizer(self, f: Value<'_, 'static>)
Add a finalizer f
to this value. The finalizer must be a Julia function, it will be
called when this value is about to be freed by the garbage collector.
Safety: the finalizer must be compatible with the data.
sourcepub unsafe fn add_ptr_finalizer(self, f: unsafe extern "C" fn(_: *mut c_void))
pub unsafe fn add_ptr_finalizer(self, f: unsafe extern "C" fn(_: *mut c_void))
Add a finalizer f
to this value. The finalizer must be an extern "C"
function that
takes one argument, the value as a void pointer.
Safety: the finalizer must be compatible with the data.
source§impl<'scope> Value<'scope, 'static>
impl<'scope> Value<'scope, 'static>
sourcepub fn bottom_type<T>(_: &T) -> Selfwhere
T: Target<'scope>,
pub fn bottom_type<T>(_: &T) -> Selfwhere T: Target<'scope>,
Union{}
.
sourcepub fn stackovf_exception<T>(_: &T) -> Selfwhere
T: Target<'scope>,
pub fn stackovf_exception<T>(_: &T) -> Selfwhere T: Target<'scope>,
StackOverflowError
.
sourcepub fn memory_exception<T>(_: &T) -> Selfwhere
T: Target<'scope>,
pub fn memory_exception<T>(_: &T) -> Selfwhere T: Target<'scope>,
OutOfMemoryError
.
sourcepub fn readonlymemory_exception<T>(_: &T) -> Selfwhere
T: Target<'scope>,
pub fn readonlymemory_exception<T>(_: &T) -> Selfwhere T: Target<'scope>,
ReadOnlyMemoryError
.
sourcepub fn diverror_exception<T>(_: &T) -> Selfwhere
T: Target<'scope>,
pub fn diverror_exception<T>(_: &T) -> Selfwhere T: Target<'scope>,
DivideError
.
sourcepub fn undefref_exception<T>(_: &T) -> Selfwhere
T: Target<'scope>,
pub fn undefref_exception<T>(_: &T) -> Selfwhere T: Target<'scope>,
UndefRefError
.
sourcepub fn interrupt_exception<T>(_: &T) -> Selfwhere
T: Target<'scope>,
pub fn interrupt_exception<T>(_: &T) -> Selfwhere T: Target<'scope>,
InterruptException
.
sourcepub fn an_empty_vec_any<T>(_: &T) -> Selfwhere
T: Target<'scope>,
pub fn an_empty_vec_any<T>(_: &T) -> Selfwhere T: Target<'scope>,
An empty `Array{Any, 1}.
sourcepub fn an_empty_string<T>(_: &T) -> Selfwhere
T: Target<'scope>,
pub fn an_empty_string<T>(_: &T) -> Selfwhere T: Target<'scope>,
An empty immutable String, “”.
sourcepub fn array_uint8_type<T>(_: &T) -> Selfwhere
T: Target<'scope>,
pub fn array_uint8_type<T>(_: &T) -> Selfwhere T: Target<'scope>,
Array{UInt8, 1}
sourcepub fn array_any_type<T>(_: &T) -> Selfwhere
T: Target<'scope>,
pub fn array_any_type<T>(_: &T) -> Selfwhere T: Target<'scope>,
Array{Any, 1}
sourcepub fn array_symbol_type<T>(_: &T) -> Selfwhere
T: Target<'scope>,
pub fn array_symbol_type<T>(_: &T) -> Selfwhere T: Target<'scope>,
Array{Symbol, 1}
sourcepub fn array_int32_type<T>(_: &T) -> Selfwhere
T: Target<'scope>,
pub fn array_int32_type<T>(_: &T) -> Selfwhere T: Target<'scope>,
Array{Int32, 1}
sourcepub fn emptytuple<T>(_: &T) -> Selfwhere
T: Target<'scope>,
pub fn emptytuple<T>(_: &T) -> Selfwhere T: Target<'scope>,
The empty tuple, ()
.
Trait Implementations§
source§impl<'scope, 'data> CCallArg for Value<'scope, 'data>
impl<'scope, 'data> CCallArg for Value<'scope, 'data>
§type CCallArgType = Value<'static, 'static>
type CCallArgType = Value<'static, 'static>
§type FunctionArgType = Value<'scope, 'data>
type FunctionArgType = Value<'scope, 'data>
ccall
ed function.source§impl<'data> Call<'data> for Value<'_, 'data>
impl<'data> Call<'data> for Value<'_, 'data>
source§unsafe fn call0<'target, T>(self, target: T) -> ValueResult<'target, 'data, T>where
T: Target<'target>,
unsafe fn call0<'target, T>(self, target: T) -> ValueResult<'target, 'data, T>where T: Target<'target>,
unsafe fn call_unchecked<'target, 'value, V, T, const N: usize>( self, target: T, args: V ) -> ValueData<'target, 'data, T>where V: Values<'value, 'data, N>, T: Target<'target>,
source§unsafe fn call1<'target, T>(
self,
target: T,
arg0: Value<'_, 'data>
) -> ValueResult<'target, 'data, T>where
T: Target<'target>,
unsafe fn call1<'target, T>( self, target: T, arg0: Value<'_, 'data> ) -> ValueResult<'target, 'data, T>where T: Target<'target>,
source§unsafe fn call2<'target, T>(
self,
target: T,
arg0: Value<'_, 'data>,
arg1: Value<'_, 'data>
) -> ValueResult<'target, 'data, T>where
T: Target<'target>,
unsafe fn call2<'target, T>( self, target: T, arg0: Value<'_, 'data>, arg1: Value<'_, 'data> ) -> ValueResult<'target, 'data, T>where T: Target<'target>,
source§unsafe fn call3<'target, T>(
self,
target: T,
arg0: Value<'_, 'data>,
arg1: Value<'_, 'data>,
arg2: Value<'_, 'data>
) -> ValueResult<'target, 'data, T>where
T: Target<'target>,
unsafe fn call3<'target, T>( self, target: T, arg0: Value<'_, 'data>, arg1: Value<'_, 'data>, arg2: Value<'_, 'data> ) -> ValueResult<'target, 'data, T>where T: Target<'target>,
source§unsafe fn call<'target, 'value, V, T, const N: usize>(
self,
target: T,
args: V
) -> ValueResult<'target, 'data, T>where
V: Values<'value, 'data, N>,
T: Target<'target>,
unsafe fn call<'target, 'value, V, T, const N: usize>( self, target: T, args: V ) -> ValueResult<'target, 'data, T>where V: Values<'value, 'data, N>, T: Target<'target>,
source§unsafe fn call_tracked<'target, 'value, V, T>(
self,
target: T,
args: V
) -> JlrsResult<ValueResult<'target, 'data, T>>where
V: AsRef<[Value<'value, 'data>]>,
T: Target<'target>,
unsafe fn call_tracked<'target, 'value, V, T>( self, target: T, args: V ) -> JlrsResult<ValueResult<'target, 'data, T>>where V: AsRef<[Value<'value, 'data>]>, T: Target<'target>,
source§impl<'data> CallAsync<'data> for Value<'_, 'data>
impl<'data> CallAsync<'data> for Value<'_, 'data>
source§unsafe fn call_async<'target, 'value, 'life0, 'async_trait, V, const N: usize>(
self,
frame: &'life0 mut AsyncGcFrame<'target>,
args: V
) -> Pin<Box<dyn Future<Output = JuliaResult<'target, 'data>> + 'async_trait>>where
V: Values<'value, 'data, N> + 'async_trait,
Self: 'async_trait,
'target: 'async_trait,
'value: 'async_trait,
'life0: 'async_trait,
unsafe fn call_async<'target, 'value, 'life0, 'async_trait, V, const N: usize>( self, frame: &'life0 mut AsyncGcFrame<'target>, args: V ) -> Pin<Box<dyn Future<Output = JuliaResult<'target, 'data>> + 'async_trait>>where V: Values<'value, 'data, N> + 'async_trait, Self: 'async_trait, 'target: 'async_trait, 'value: 'async_trait, 'life0: 'async_trait,
Base.Threads.@spawn
, and returns a future
that resolves when this task is finished. Read moresource§unsafe fn call_async_interactive<'target, 'value, 'life0, 'async_trait, V, const N: usize>(
self,
frame: &'life0 mut AsyncGcFrame<'target>,
args: V
) -> Pin<Box<dyn Future<Output = JuliaResult<'target, 'data>> + 'async_trait>>where
V: Values<'value, 'data, N> + 'async_trait,
Self: 'async_trait,
'target: 'async_trait,
'value: 'async_trait,
'life0: 'async_trait,
unsafe fn call_async_interactive<'target, 'value, 'life0, 'async_trait, V, const N: usize>( self, frame: &'life0 mut AsyncGcFrame<'target>, args: V ) -> Pin<Box<dyn Future<Output = JuliaResult<'target, 'data>> + 'async_trait>>where V: Values<'value, 'data, N> + 'async_trait, Self: 'async_trait, 'target: 'async_trait, 'value: 'async_trait, 'life0: 'async_trait,
Base.Threads.@spawn
to call the given function on another thread but return immediately.
While await
ing the result the async runtime can work on other tasks, the current task
resumes after the function call on the other thread completes. Read moresource§unsafe fn schedule_async_interactive<'target, 'value, V, const N: usize>(
self,
frame: &mut AsyncGcFrame<'target>,
args: V
) -> JuliaResult<'target, 'data, Task<'target>>where
V: Values<'value, 'data, N>,
unsafe fn schedule_async_interactive<'target, 'value, V, const N: usize>( self, frame: &mut AsyncGcFrame<'target>, args: V ) -> JuliaResult<'target, 'data, Task<'target>>where V: Values<'value, 'data, N>,
CallAsync::call_async
, but the task is returned rather than an
awaitable Future
. This method should only be called in PersistentTask::init
,
otherwise it’s not guaranteed this task can make progress. Read moresource§unsafe fn schedule_async<'target, 'value, V, const N: usize>(
self,
frame: &mut AsyncGcFrame<'target>,
args: V
) -> JuliaResult<'target, 'data, Task<'target>>where
V: Values<'value, 'data, N>,
unsafe fn schedule_async<'target, 'value, V, const N: usize>( self, frame: &mut AsyncGcFrame<'target>, args: V ) -> JuliaResult<'target, 'data, Task<'target>>where V: Values<'value, 'data, N>,
CallAsync::call_async
, but the task is returned rather than an
awaitable Future
. This method should only be called in PersistentTask::init
,
otherwise it’s not guaranteed this task can make progress. Read moresource§unsafe fn call_async_local<'target, 'value, 'life0, 'async_trait, V, const N: usize>(
self,
frame: &'life0 mut AsyncGcFrame<'target>,
args: V
) -> Pin<Box<dyn Future<Output = JuliaResult<'target, 'data>> + 'async_trait>>where
V: Values<'value, 'data, N> + 'async_trait,
Self: 'async_trait,
'target: 'async_trait,
'value: 'async_trait,
'life0: 'async_trait,
unsafe fn call_async_local<'target, 'value, 'life0, 'async_trait, V, const N: usize>( self, frame: &'life0 mut AsyncGcFrame<'target>, args: V ) -> Pin<Box<dyn Future<Output = JuliaResult<'target, 'data>> + 'async_trait>>where V: Values<'value, 'data, N> + 'async_trait, Self: 'async_trait, 'target: 'async_trait, 'value: 'async_trait, 'life0: 'async_trait,
@async
block. Like call_async
, the
function is not called on the main thread, but on a separate thread that handles all
tasks created by this method. This method should only be used with functions that do very
little computational work but mostly spend their time waiting on IO. Read moresource§unsafe fn schedule_async_local<'target, 'value, V, const N: usize>(
self,
frame: &mut AsyncGcFrame<'target>,
args: V
) -> JuliaResult<'target, 'data, Task<'target>>where
V: Values<'value, 'data, N>,
unsafe fn schedule_async_local<'target, 'value, V, const N: usize>( self, frame: &mut AsyncGcFrame<'target>, args: V ) -> JuliaResult<'target, 'data, Task<'target>>where V: Values<'value, 'data, N>,
CallAsync::call_async_local
, but the task is returned rather
than an awaitable Future
. This method should only be called in PersistentTask::init
,
otherwise it’s not guaranteed this task can make progress. Read moresource§unsafe fn call_async_main<'target, 'value, 'life0, 'async_trait, V, const N: usize>(
self,
frame: &'life0 mut AsyncGcFrame<'target>,
args: V
) -> Pin<Box<dyn Future<Output = JuliaResult<'target, 'data>> + 'async_trait>>where
V: Values<'value, 'data, N> + 'async_trait,
Self: 'async_trait,
'target: 'async_trait,
'value: 'async_trait,
'life0: 'async_trait,
unsafe fn call_async_main<'target, 'value, 'life0, 'async_trait, V, const N: usize>( self, frame: &'life0 mut AsyncGcFrame<'target>, args: V ) -> Pin<Box<dyn Future<Output = JuliaResult<'target, 'data>> + 'async_trait>>where V: Values<'value, 'data, N> + 'async_trait, Self: 'async_trait, 'target: 'async_trait, 'value: 'async_trait, 'life0: 'async_trait,
@async
block. The task is scheduled on
the main thread. This method should only be used with functions that must run on the main
thread. The runtime is blocked while this task is active. Read moresource§unsafe fn schedule_async_main<'target, 'value, V, const N: usize>(
self,
frame: &mut AsyncGcFrame<'target>,
args: V
) -> JuliaResult<'target, 'data, Task<'target>>where
V: Values<'value, 'data, N>,
unsafe fn schedule_async_main<'target, 'value, V, const N: usize>( self, frame: &mut AsyncGcFrame<'target>, args: V ) -> JuliaResult<'target, 'data, Task<'target>>where V: Values<'value, 'data, N>,
CallAsync::call_async_main
, but the task is returned rather
than an awaitable Future
. This method should only be called in PersistentTask::init
,
otherwise it’s not guaranteed this task can make progress. Read moresource§unsafe fn call_async_tracked<'target, 'value, 'life0, 'async_trait, V, const N: usize>(
self,
frame: &'life0 mut AsyncGcFrame<'target>,
args: V
) -> Pin<Box<dyn Future<Output = JlrsResult<JuliaResult<'target, 'data>>> + 'async_trait>>where
V: Values<'value, 'data, N> + 'async_trait,
Self: 'async_trait,
'target: 'async_trait,
'value: 'async_trait,
'life0: 'async_trait,
unsafe fn call_async_tracked<'target, 'value, 'life0, 'async_trait, V, const N: usize>( self, frame: &'life0 mut AsyncGcFrame<'target>, args: V ) -> Pin<Box<dyn Future<Output = JlrsResult<JuliaResult<'target, 'data>>> + 'async_trait>>where V: Values<'value, 'data, N> + 'async_trait, Self: 'async_trait, 'target: 'async_trait, 'value: 'async_trait, 'life0: 'async_trait,
Base.Threads.@spawn
, and returns a future
that resolves when this task is finished. Read moresource§unsafe fn schedule_async_tracked<'target, 'value, V, T, const N: usize>(
self,
frame: &mut AsyncGcFrame<'target>,
args: V
) -> JlrsResult<JuliaResult<'target, 'data, Task<'target>>>where
V: Values<'value, 'data, N>,
T: Target<'target>,
unsafe fn schedule_async_tracked<'target, 'value, V, T, const N: usize>( self, frame: &mut AsyncGcFrame<'target>, args: V ) -> JlrsResult<JuliaResult<'target, 'data, Task<'target>>>where V: Values<'value, 'data, N>, T: Target<'target>,
CallAsync::call_async
, but the task is returned rather than an
awaitable Future
. This method should only be called in PersistentTask::init
,
otherwise it’s not guaranteed this task can make progress. Read moresource§unsafe fn call_async_interactive_tracked<'target, 'value, 'life0, 'async_trait, V, const N: usize>(
self,
frame: &'life0 mut AsyncGcFrame<'target>,
args: V
) -> Pin<Box<dyn Future<Output = JlrsResult<JuliaResult<'target, 'data>>> + 'async_trait>>where
V: Values<'value, 'data, N> + 'async_trait,
Self: 'async_trait,
'target: 'async_trait,
'value: 'async_trait,
'life0: 'async_trait,
unsafe fn call_async_interactive_tracked<'target, 'value, 'life0, 'async_trait, V, const N: usize>( self, frame: &'life0 mut AsyncGcFrame<'target>, args: V ) -> Pin<Box<dyn Future<Output = JlrsResult<JuliaResult<'target, 'data>>> + 'async_trait>>where V: Values<'value, 'data, N> + 'async_trait, Self: 'async_trait, 'target: 'async_trait, 'value: 'async_trait, 'life0: 'async_trait,
Base.Threads.@spawn
to call the given function on another thread but return immediately.
While await
ing the result the async runtime can work on other tasks, the current task
resumes after the function call on the other thread completes. Read moresource§unsafe fn schedule_async_interactive_tracked<'target, 'value, V, T, const N: usize>(
self,
frame: &mut AsyncGcFrame<'target>,
args: V
) -> JlrsResult<JuliaResult<'target, 'data, Task<'target>>>where
V: Values<'value, 'data, N>,
T: Target<'target>,
unsafe fn schedule_async_interactive_tracked<'target, 'value, V, T, const N: usize>( self, frame: &mut AsyncGcFrame<'target>, args: V ) -> JlrsResult<JuliaResult<'target, 'data, Task<'target>>>where V: Values<'value, 'data, N>, T: Target<'target>,
CallAsync::call_async
, but the task is returned rather than an
awaitable Future
. This method should only be called in PersistentTask::init
,
otherwise it’s not guaranteed this task can make progress. Read moresource§unsafe fn call_async_local_tracked<'target, 'value, 'life0, 'async_trait, V, const N: usize>(
self,
frame: &'life0 mut AsyncGcFrame<'target>,
args: V
) -> Pin<Box<dyn Future<Output = JlrsResult<JuliaResult<'target, 'data>>> + 'async_trait>>where
V: Values<'value, 'data, N> + 'async_trait,
Self: 'async_trait,
'target: 'async_trait,
'value: 'async_trait,
'life0: 'async_trait,
unsafe fn call_async_local_tracked<'target, 'value, 'life0, 'async_trait, V, const N: usize>( self, frame: &'life0 mut AsyncGcFrame<'target>, args: V ) -> Pin<Box<dyn Future<Output = JlrsResult<JuliaResult<'target, 'data>>> + 'async_trait>>where V: Values<'value, 'data, N> + 'async_trait, Self: 'async_trait, 'target: 'async_trait, 'value: 'async_trait, 'life0: 'async_trait,
@async
block. Like call_async
, the
function is not called on the main thread, but on a separate thread that handles all
tasks created by this method. This method should only be used with functions that do very
little computational work but mostly spend their time waiting on IO. Read moresource§unsafe fn schedule_async_local_tracked<'target, 'value, V, T, const N: usize>(
self,
frame: &mut AsyncGcFrame<'target>,
args: V
) -> JlrsResult<JuliaResult<'target, 'data, Task<'target>>>where
V: Values<'value, 'data, N>,
T: Target<'target>,
unsafe fn schedule_async_local_tracked<'target, 'value, V, T, const N: usize>( self, frame: &mut AsyncGcFrame<'target>, args: V ) -> JlrsResult<JuliaResult<'target, 'data, Task<'target>>>where V: Values<'value, 'data, N>, T: Target<'target>,
CallAsync::call_async_local
, but the task is returned rather
than an awaitable Future
. This method should only be called in PersistentTask::init
,
otherwise it’s not guaranteed this task can make progress. Read moresource§unsafe fn call_async_main_tracked<'target, 'value, 'life0, 'async_trait, V, const N: usize>(
self,
frame: &'life0 mut AsyncGcFrame<'target>,
args: V
) -> Pin<Box<dyn Future<Output = JlrsResult<JuliaResult<'target, 'data>>> + 'async_trait>>where
V: Values<'value, 'data, N> + 'async_trait,
Self: 'async_trait,
'target: 'async_trait,
'value: 'async_trait,
'life0: 'async_trait,
unsafe fn call_async_main_tracked<'target, 'value, 'life0, 'async_trait, V, const N: usize>( self, frame: &'life0 mut AsyncGcFrame<'target>, args: V ) -> Pin<Box<dyn Future<Output = JlrsResult<JuliaResult<'target, 'data>>> + 'async_trait>>where V: Values<'value, 'data, N> + 'async_trait, Self: 'async_trait, 'target: 'async_trait, 'value: 'async_trait, 'life0: 'async_trait,
@async
block. The task is scheduled on
the main thread. This method should only be used with functions that must run on the main
thread. The runtime is blocked while this task is active. Read moresource§unsafe fn schedule_async_main_tracked<'target, 'value, V, T, const N: usize>(
self,
frame: &mut AsyncGcFrame<'target>,
args: V
) -> JlrsResult<JuliaResult<'target, 'data, Task<'target>>>where
V: Values<'value, 'data, N>,
T: Target<'target>,
unsafe fn schedule_async_main_tracked<'target, 'value, V, T, const N: usize>( self, frame: &mut AsyncGcFrame<'target>, args: V ) -> JlrsResult<JuliaResult<'target, 'data, Task<'target>>>where V: Values<'value, 'data, N>, T: Target<'target>,
CallAsync::call_async_main
, but the task is returned rather
than an awaitable Future
. This method should only be called in PersistentTask::init
,
otherwise it’s not guaranteed this task can make progress. Read moresource§impl ConstructType for Value<'_, '_>
impl ConstructType for Value<'_, '_>
source§fn construct_type_uncached<'target, 'current, 'borrow, Tgt>(
target: Tgt
) -> ValueData<'target, 'static, Tgt>where
Tgt: Target<'target>,
fn construct_type_uncached<'target, 'current, 'borrow, Tgt>( target: Tgt ) -> ValueData<'target, 'static, Tgt>where Tgt: Target<'target>,
source§fn base_type<'target, Tgt>(_target: &Tgt) -> Option<Value<'target, 'static>>where
Tgt: Target<'target>,
fn base_type<'target, Tgt>(_target: &Tgt) -> Option<Value<'target, 'static>>where Tgt: Target<'target>,
source§fn construct_type<'target, T>(target: T) -> ValueData<'target, 'static, T>where
T: Target<'target>,
fn construct_type<'target, T>(target: T) -> ValueData<'target, 'static, T>where T: Target<'target>,
source§impl<'scope, 'data> PartialEq<Value<'scope, 'data>> for DataType<'scope>
impl<'scope, 'data> PartialEq<Value<'scope, 'data>> for DataType<'scope>
source§impl<'value, 'data> ProvideKeywords<'value, 'data> for Value<'value, 'data>
impl<'value, 'data> ProvideKeywords<'value, 'data> for Value<'value, 'data>
source§fn provide_keywords(
self,
kws: Value<'value, 'data>
) -> JlrsResult<WithKeywords<'value, 'data>>
fn provide_keywords( self, kws: Value<'value, 'data> ) -> JlrsResult<WithKeywords<'value, 'data>>
NamedTuple
. Read moresource§impl ValidLayout for Value<'static, 'static>
impl ValidLayout for Value<'static, 'static>
impl<'scope, 'data> Copy for Value<'scope, 'data>
impl<'scope, 'data> Eq for Value<'scope, 'data>
impl<'scope, 'data> StructuralEq for Value<'scope, 'data>
Auto Trait Implementations§
impl<'scope, 'data> RefUnwindSafe for Value<'scope, 'data>
impl<'scope, 'data> !Send for Value<'scope, 'data>
impl<'scope, 'data> !Sync for Value<'scope, 'data>
impl<'scope, 'data> Unpin for Value<'scope, 'data>
impl<'scope, 'data> !UnwindSafe for Value<'scope, 'data>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CompatibleCast for Twhere
T: ValidLayout,
impl<T> CompatibleCast for Twhere T: ValidLayout,
type Inner = T
type Output<U> = U
source§fn compatible_cast<U>(&self) -> &<T as CompatibleCast>::Output<U>where
T: Compatible<U>,
fn compatible_cast<U>(&self) -> &<T as CompatibleCast>::Output<U>where T: Compatible<U>,
&Self
to &U
, &[Self]
to &[U]
, and &[Self; N]
to &[U; N]
.source§fn compatible_cast_mut<U>(&mut self) -> &mut <T as CompatibleCast>::Output<U>where
T: Compatible<U>,
fn compatible_cast_mut<U>(&mut self) -> &mut <T as CompatibleCast>::Output<U>where T: Compatible<U>,
&mut Self
to &mut U
, &mut [Self]
to &mut [U]
, and &mut [Self; N]
to
&mut [U; N]
.§impl<T> Conv for T
impl<T> Conv for 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,
self
to use its Display
implementation when
Debug
-formatted.§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where Self: LowerExp,
self
to use its LowerExp
implementation when
Debug
-formatted.§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where Self: LowerHex,
self
to use its LowerHex
implementation when
Debug
-formatted.§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,
self
to use its Pointer
implementation when
Debug
-formatted.§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where Self: UpperExp,
self
to use its UpperExp
implementation when
Debug
-formatted.§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where Self: UpperHex,
self
to use its UpperHex
implementation when
Debug
-formatted.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where &'a Self: for<'a> IntoIterator,
source§impl<'scope, 'data, T> HasLayout<'scope, 'data> for Twhere
T: ConstructType + ValidLayout,
impl<'scope, 'data, T> HasLayout<'scope, 'data> for Twhere T: ConstructType + ValidLayout,
source§impl<'scope, 'data, W> Managed<'scope, 'data> for Wwhere
W: ManagedPriv<'scope, 'data>,
impl<'scope, 'data, W> Managed<'scope, 'data> for Wwhere W: ManagedPriv<'scope, 'data>,
§type TypeConstructor<'target, 'da> = <W as ManagedPriv<'scope, 'data>>::TypeConstructorPriv<'target, 'da>
type TypeConstructor<'target, 'da> = <W as ManagedPriv<'scope, 'data>>::TypeConstructorPriv<'target, 'da>
Self
, but with arbitrary lifetimes. Used to construct the appropriate type in generic
contexts.source§fn 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>,
source§fn unrooted_target(self) -> Unrooted<'scope>
fn unrooted_target(self) -> Unrooted<'scope>
Unrooted
.source§fn display_string(self) -> JlrsResult<String>
fn display_string(self) -> JlrsResult<String>
Base.show
.source§fn 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
or AsyncJulia::error_color
.source§fn display_string_or<S: Into<String>>(self, default: S) -> String
fn display_string_or<S: Into<String>>(self, default: S) -> String
Base.display
, or some default value.§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 more§fn 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 more§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<'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,
self
, then passes self.as_mut()
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 more§fn 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 more§fn 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 more§fn 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 more§fn 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 more§fn 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 more§fn 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.§fn 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.§fn 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.§fn 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.§fn 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.