#[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, or None if the index is out of bounds.

Returns the field type of the field at position idx without performing a bounds check.

Safety: idx must be in-bounds.

Returns the field type of the field at position idx.

Returns the field names of this type.

Returns the name of the field at position idx.

Returns the index of the field with the name field_name.

Returns the index of the field with the name field_name, if the field doesn’t exist the result is -1.

Returns the name of the field at position idx.

Returns the instance if this type is a singleton.

Returns a pointer to the layout of this DataType.

Returns the size of a value of this type in bytes.

Returns the hash of this type.

Returns true if this is an abstract type.

Returns true if this is a mutable 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 this type is a bits-type.

Returns true if values of this type are zero-initialized.

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).

Performs the given typecheck on this type.

Returns the alignment of a value of this type in bytes.

Returns the size of a value of this type in bits.

Returns the number of fields of a value of this type.

Returns the name of this type.

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 stored as a pointer.

Returns true if the field at position idx is an atomic field.

Returns the size of the field at position idx in this type.

Safety: an exception must not be thrown if this method is called from a ccalled function.

Returns the offset where the field at position idx is stored.

Safety: an exception must not be thrown if this method is called from a ccalled function.

Returns true if the field at position idx is stored as a pointer.

Safety: an exception must not be thrown if this method is called from a ccalled function.

Returns true if the field at position idx is an atomic field.

Safety: an exception must not be thrown if this method is called from a ccalled function.

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 DataTypes, 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.

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 DataTypes, 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.

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 DataTypes, 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.

Safety: an exception must not be thrown if this method is called from a ccalled function.

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 DataTypes, 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.

Safety: an exception must not be thrown if this method is called from a ccalled function.

Use the Output to extend the lifetime of this data.

The type of the bottom type, Union{}.

The type DataType.

The type Union.

The type UnionAll.

The type TypeVar.

The type Any.

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 Bool.

The type Char.

The type Int8.

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 Task.

The type Expr.

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.

source

pub fn typemap_entry_type(_: Global<'base>) -> Self

The type TypeMapEntry.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Convert the wrapper to a Ref.

Convert the wrapper to a Value.

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

Convert the wrapper to its error string, i.e. the string that is shown when this value is thrown as an exception, or some default value. Read more