#[repr(transparent)]
pub struct Value(pub VALUE);
Expand description

Wraps a plain old Ruby FFI VALUE with much more functionality.

Tuple Fields

0: VALUE

Implementations

The Ruby nil value.

The Ruby true value.

The Ruby false value.

Sends a Ruby method and returns the result.

Sends a Ruby method without rescuing Ruby unwind.

Gets a constant by name. Equivalent to Object#const_get(constant_name).

Gets a constant by name. Equivalent to Object#const_get(constant_name).

Sets a constant. Equivalent to Object#const_set(constant_name, value).

Sets a constant. Equivalent to Object#const_set(constant_name, value).

Convert a Ruby value to a Rust string.

Calls Object#to_s and then converts the result to a string.

Convert a Ruby value to a Rust string.

Convert a Ruby string to a Rust string. Gets the class name for an object

Calls Object#inspect

Calls Object#inspect

Checks if this object is of the given value type.

Checks if this value is nil.

Trait Implementations

Converts this type into a shared reference of the (usually inferred) input type.

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

The resulting type after dereferencing.

Dereferences the value.

Mutably dereferences the value.

Formats the value using the given formatter. Read more

Converts to this type from the input type.

Converts to this type from the input type.

The associated error which can be returned from parsing.

Parses a string s to return a value of this type. Read more

Converts this type into the (usually inferred) input type.

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

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

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.