Enum artichoke_backend::prelude::Ruby[][src]

pub enum Ruby {
Show 21 variants Array, Bool, Class, CPointer, Data, Exception, Fiber, Fixnum, Float, Hash, InlineStruct, Module, Nil, Object, Proc, Range, SingletonClass, String, Symbol, Unreachable, RecursiveSelfOwnership,
}
Expand description

Classes of Ruby types.

Variants

Array

Ruby Array type.

Bool

Ruby TrueClass and FalseClass type.

Class

Ruby Class type.

CPointer

FFI type for a borrowed C pointer.

Data

FFI type for an owned C pointer.

Exception

Ruby Exception type.

Fiber

Ruby Fiber type.

Fixnum

Ruby Fixnum type.

Fixnum is a type of Integer which represents numbers from [-u64::MAX, us64::MAX]. Fixnums have a special algorithm for object IDs: 2 * self - 1.

Float

Ruby Float type.

Hash

Ruby Hash type.

Similar to a HashMap, but iterates by insertion order.

InlineStruct

Internal type for non-heap allocated structs.

Module

Ruby Module type.

Nil

Ruby nil singleton type, the only instance of NilClass.

Object

Ruby Object type.

This type represents instances of classes defined in the Artichoke VM.

Proc

Ruby Proc type.

Proc is a callable closure that captures lexical scope. Procs can be arbitrary arity and may or may not enforce this arity when called.

Range

Ruby Range type.

Similar to a Rust iterator.

SingletonClass

Internal type for the singleton class of an object.

String

Ruby String type.

In Artichoke, Strings have a limited set of encodings. A String can be UTF-8, maybe UTF-8, or binary.

Symbol

Ruby Symbol type.

An interned String. Symbols are never freed by the interpreter.

Unreachable

Unreachable interpreter value. Receiving one of these from the interpreter is a bug.

RecursiveSelfOwnership

A special Value that is a placeholder for collections that own themselves.

Implementations

Ruby Class name for VM type.

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

Formats the value using the given formatter. Read more

Performs the conversion.

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

Restrict a value to a certain interval. 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 returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

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

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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

Converts the given value to a String. 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.