pub struct LuaDatum<'a, 'b, 'c>(_);
Expand description

Lua value (of any supported type)

A LuaDatum is used to pass values from Rust to Lua and vice versa. It can contain values of several types (dynamic typing). See module sandkiste::types for more information.

Lifetimes

Lifetime argument 'a corresponds to the lifetime argument 'a of LuaMachine. It is a lower bound for closures passed to the Lua machine.

Lifetime argument 'b corresponds to the lifetime of the shared reference to the LuaMachine being worked with.

Lifetime argument 'c is often 'static but can be a shorter lifetime for temporary LuaDatums created from a &'c str reference, for example.

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

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Type of elements

Return error unless datum is an array-like type

Array length

Retrieve element at index Read more

Set element at index Read more

Push element to array

Truncate array

Create Iterator over entries of array-like datum

Create Vec from array-like datum

Try to interpret datum as binary (8 bit) string

Try to convert datum into binary (8 bit) string

Try to interpret datum as boolean value

Try to interpret datum as f64

Try to interpret datum as f64

Function type (see Machine::Function)

Convert from Machine::Function

Try to interpret datum as function

Reference or smart pointer to MaybeFunction::Function as returned by try_as_function Read more

Try to interpret datum as i64

Try to interpret datum as u64

Try to interpret datum as i32

Try to interpret datum as u32

Try to interpret datum as i16

Try to interpret datum as u16

Try to interpret datum as i8

Try to interpret datum as u8

Try to interpret datum as isize

Try to interpret datum as usize

Type used to represent reference to an opaque datum

Try to interpret datum as reference to opaque datum

Reference or smart pointer to MaybeOpaque::Opaque as returned by try_as_opaque Read more

Try to interpret datum as Unicode string

Try to convert datum into Unicode string

Type of values

Return error unless datum is a string-map-like type

Get entry from string map

Set entry in string map

Datum representing a null value

Can the datum be interpreted as a null value?

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.

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.

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.

The type returned in the event of a conversion error.

Performs the conversion.

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

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.