Struct jlrs::wrappers::ptr::datatype::DataType [−][src]
#[repr(transparent)]pub struct DataType<'scope>(_, _);
Expand description
Julia type information. You can acquire a Value
’s datatype by by calling
Value::datatype
. If a DataType
is concrete and not a subtype of Array
a new instance
can be created with DataType::instantiate
.
Implementations
Returns the TypeName
of this type.
Returns the super type of this type.
Returns the type parameters of this type.
Returns the number of type parameters.
Returns the type parameter at position idx
, or None
if the index is out of bounds.
Returns the field types of this type.
Returns the field type of the field at position idx
.
Returns the field type of the field at position idx
if self
is a concrete datatype.
Returns the field names of this type.
Returns the name of the field at position idx
.
Returns the name of the field at position idx
.
Returns the instance if this type is a singleton.
Returns true if this is an abstract type.
Returns true if one or more of the type parameters has not been set.
Returns true if this type can have instances
Returns true if this type is a dispatch, or leaf, tuple type.
Returns true if a value of this type stores its data inline.
If false, no value will have this type.
If true, the type is stored in hash-based set cache (instead of linear cache).
Returns the size of the field at position idx
in this type.
Returns the offset where the field at position idx
is stored.
Returns true if the field at position idx
is a pointer.
pub fn instantiate<'target, 'frame, 'value, 'borrow, V, S, F>(
self,
scope: S,
values: V
) -> JlrsResult<S::JuliaResult> where
S: Scope<'target, 'frame, 'borrow, F>,
F: Frame<'frame>,
V: AsMut<[Value<'value, 'borrow>]>,
pub fn instantiate<'target, 'frame, 'value, 'borrow, V, S, F>(
self,
scope: S,
values: V
) -> JlrsResult<S::JuliaResult> where
S: Scope<'target, 'frame, 'borrow, F>,
F: Frame<'frame>,
V: AsMut<[Value<'value, 'borrow>]>,
Create a new instance of this DataType
, using values
to set the fields.
This is essentially a more powerful version of Value::new
that can instantiate
arbitrary concrete DataType
s, at the cost that each of its fields must have already been
allocated as a Value
. This functions returns an error if the given DataType
isn’t
concrete or is an array type. For custom array types you must use Array::new_for
.
pub fn instantiate_unrooted<'global, 'value, 'borrow, V>(
self,
_: Global<'global>,
values: V
) -> JlrsResult<JuliaResultRef<'global, 'borrow>> where
V: AsMut<[Value<'value, 'borrow>]>,
pub fn instantiate_unrooted<'global, 'value, 'borrow, V>(
self,
_: Global<'global>,
values: V
) -> JlrsResult<JuliaResultRef<'global, 'borrow>> where
V: AsMut<[Value<'value, 'borrow>]>,
Create a new instance of this DataType
, using values
to set the fields.
This is essentially a more powerful version of Value::new
that can instantiate
arbitrary concrete DataType
s, at the cost that each of its fields must have already been
allocated as a Value
. This functions returns an error if the given DataType
is not
concrete or an array type. Unlike DataType::instantiate
this method doesn’t root the
allocated value.
pub fn instantiate_unchecked<'target, 'frame, 'value, 'borrow, V, S, F>(
self,
scope: S,
values: V
) -> JlrsResult<S::Value> where
S: Scope<'target, 'frame, 'borrow, F>,
F: Frame<'frame>,
V: AsMut<[Value<'value, 'borrow>]>,
pub fn instantiate_unchecked<'target, 'frame, 'value, 'borrow, V, S, F>(
self,
scope: S,
values: V
) -> JlrsResult<S::Value> where
S: Scope<'target, 'frame, 'borrow, F>,
F: Frame<'frame>,
V: AsMut<[Value<'value, 'borrow>]>,
Create a new instance of this DataType
, using values
to set the fields.
This is essentially a more powerful version of Value::new
that can instantiate
arbitrary concrete DataType
s, at the cost that each of its fields must have already been
allocated as a Value
.
This method performs no checks whether or not the value can be constructed with these values. If Julia throws an exception the process aborts.
Create a new instance of this DataType
, using values
to set the fields.
This is essentially a more powerful version of Value::new
that can instantiate
arbitrary concrete DataType
s, at the cost that each of its fields must have already been
allocated as a Value
.
This method performs no checks whether or not the value can be constructed with these values. If Julia throws an exception the process aborts.
The type of the bottom type, Union{}
.
The type DataType
.
The type Union
.
The type UnionAll
.
The type TypeName
.
The type Symbol
.
The type SSAValue
.
The type Slot
.
The type SlotNumber
.
The type TypedSlot
.
The type Core.Argument
The type Core.Const
The type Core.PartialStruct
The type Core.PartialOpaque
The type Core.InterConditional
The type MethodMatch
The type SimpleVector
.
The type Tuple
.
The type of an empty tuple.
The type Tuple
.
The type Vararg
.
The type Function
.
The type Builtin
.
The type MethodInstance
.
The type CodeInstance
.
The type CodeInfo
.
The type Method
.
The type Module
.
The type WeakRef
.
The type AbstractString
.
The type String
.
The type ErrorException
.
The type ArgumentError
.
The type LoadError
.
The type InitError
.
The type TypeError
.
The type MethodError
.
The type UndefVarError
.
The type Core.AtomicError
.
The type LineInfoNode
.
The type BoundsError
.
The type UInt8
.
The type Int16
.
The type UInt16
.
The type Int32
.
The type UInt32
.
The type Int64
.
The type UInt64
.
The type Float16
.
The type Float32
.
The type Float64
.
The type AbstractFloat
.
The type Number
.
The type Nothing
.
The type Signed
.
The type Ptr{Nothing}
.
The type GlobalRef
.
The type LineNumberNode
.
The type GotoNode
.
The type GotoIfNot
.
The type ReturnNode
.
The type PhiNode
.
The type PiNode
.
The type PhiCNode
.
The type UpsilonNode
.
The type QuoteNode
.
The type NewVarNode
.
The type Intrinsic
.
The type MethodTable
.
The type TypeMapLevel
.
The type TypeMapEntry
.
Trait Implementations
Check if the layout of the implementor is compatible with the layout of ty
. This
argument is a Value
to account for the fact that a field type can be a Union
,
UnionAll
or Union{}
. Read more
Auto Trait Implementations
impl<'scope> RefUnwindSafe for DataType<'scope>
impl<'scope> UnwindSafe for DataType<'scope>
Blanket Implementations
Mutably borrows from an owned value. Read more
Convert the wrapper to its display string, i.e. the string that is shown when calling
Base.show
. Read more
Convert the wrapper to its error string, i.e. the string that is shown when calling
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
Convert the wrapper to its display string, i.e. the string that is shown by calling
Base.display
, or some default value. Read more