ValRef

Struct ValRef 

Source
pub struct ValRef<'a> { /* private fields */ }
Expand description

Value reference on the lua stack

Implementations§

Source§

impl<'a> ValRef<'a>

Source

pub fn deserialize<T: Deserialize<'a>>(&'a self) -> Result<T, DesErr>

Deserialize a lua value

Source

pub fn transcode<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error>

Transcode a lua value to another serialize format

Source§

impl<'a> ValRef<'a>

Source

pub fn state(&self) -> &'a State

Source

pub fn type_of(&self) -> Type

Type of this value

Source

pub fn is_nil(&self) -> bool

Source

pub fn is_integer(&self) -> bool

Source

pub fn is_table(&self) -> bool

Source

pub fn is_function(&self) -> bool

Source

pub fn check_safe_index(&self) -> Result<()>

Source

pub fn to_safe_bytes(&self) -> Result<&'a [u8]>

Source

pub fn to_safe_str(&self) -> Result<&'a str>

Source

pub fn to_bytes(&self) -> Option<&[u8]>

Source

pub fn to_str(&self) -> Option<&str>

Source

pub fn to_string_lossy(&self) -> Option<Cow<'_, str>>

Source

pub fn to_bool(&self) -> bool

Source

pub fn to_integer(&self) -> lua_Integer

Source

pub fn to_number(&self) -> lua_Number

Source

pub fn to_pointer(&self) -> *const c_void

Source

pub fn to_cstr_ptr(&self) -> *const c_char

Source

pub fn tostring(&self) -> Cow<'_, str>

Call tostring if this value is not a string

Source

pub fn index(&self) -> Index

Index number of this value on the lua stack

Source

pub fn check_type(&self, ty: Type) -> Result<()>

Source

pub fn check_type2(&self, ty1: Type, ty2: Type) -> Result<()>

Source

pub fn cast_into<T: FromLua<'a> + 'a>(self) -> Result<T>

Cast a lua value to its rust type, wrapper of FromLua::from_lua

See FromLua

Source

pub fn cast<T: FromLua<'a> + 'static>(&self) -> Result<T>

Alias to cast_into(), not take the ownship, but only convert to static-lifetime types

Source

pub fn geti(&self, i: impl Into<lua_Integer>) -> Result<ValRef<'a>>

Get value associated to integer key, equivalent to return self[i] in lua

Source

pub fn seti<V: ToLua>(&self, i: impl Into<lua_Integer>, v: V) -> Result<()>

Set value with integer key, equivalent to self[i] = v in lua

Source

pub fn len(&self) -> Result<ValRef<'a>>

Get length of the value, equivalent to return #self in lua

Source

pub fn set<K: ToLua, V: ToLua>(&self, k: K, v: V) -> Result<()>

Set value with any key, equivalent to self[k] = v in lua

Source

pub fn get<K: ToLua>(&self, key: K) -> Result<ValRef<'a>>

Get value associated to key, equivalent to return self[k] in lua

Source

pub fn getopt<K: ToLua, V: FromLua<'a> + 'a>(&self, k: K) -> Result<Option<V>>

Source

pub fn pcall<T: ToLuaMulti, R: FromLuaMulti<'a>>(&self, args: T) -> Result<R>

Call this value as a function

Source

pub fn pcall_void<T: ToLuaMulti>(&self, args: T) -> Result<()>

Invoke pcall() without return value

Source

pub fn has_metatable(&self) -> bool

Source

pub fn metatable(&self) -> Result<Option<Table<'a>>>

Get metatable of lua table or userdata

Source

pub fn set_metatable(&self, t: Table<'_>) -> Result<()>

Set metatable for lua table or userdata

Source

pub fn remove_metatable(&self)

Remove metatable for lua table or userdata

Source

pub fn call_metamethod<T: ToLuaMulti, R: FromLuaMulti<'a>>( &self, m: &str, args: T, ) -> Result<R>

Call a metamethod

Source

pub fn close_and_remove_metatable(self) -> Result<()>

Close this value, if userdata, the subsequent access to it in lua is invalid

Source

pub fn call_close_and_remove_metatable(&self) -> Result<()>

Source

pub fn raw_equal(&self, other: &Self) -> bool

Tests whether two lua values are equal without metamethod triggers

Source

pub fn raw_len(&self) -> usize

Get length of the string/userdata/table without metamethod triggers

Source

pub fn checked_into_value(self) -> Option<Value<'a>>

Source

pub fn into_registry_value(self) -> Result<RegVal>

Source

pub fn into_value(self) -> Value<'a>

Source

pub fn check_valid(self) -> Option<Self>

Return Some(self) if type is neither Type::Invalid nor Type::None

Source§

impl<'a> ValRef<'a>

Source

pub fn as_table(&self) -> Option<&Table<'a>>

Source§

impl<'a> ValRef<'a>

Source

pub fn as_function(&self) -> Option<&Function<'a>>

Source§

impl<'a> ValRef<'a>

Source

pub fn as_string(&self) -> Option<&LuaString<'a>>

Source§

impl<'a> ValRef<'a>

Source

pub fn as_thread(&self) -> Option<&LuaThread<'a>>

Source§

impl<'a> ValRef<'a>

Source

pub fn as_userdata(&self) -> Option<&LuaUserData<'a>>

Source§

impl ValRef<'_>

Source

pub fn airth_add(&self, rhs: impl ToLua) -> Result<Self>

Source

pub fn airth_sub(&self, rhs: impl ToLua) -> Result<Self>

Source

pub fn airth_mul(&self, rhs: impl ToLua) -> Result<Self>

Source

pub fn airth_div(&self, rhs: impl ToLua) -> Result<Self>

Source

pub fn airth_rem(&self, rhs: impl ToLua) -> Result<Self>

Source

pub fn airth_bitand(&self, rhs: impl ToLua) -> Result<Self>

Source

pub fn airth_bitor(&self, rhs: impl ToLua) -> Result<Self>

Source

pub fn airth_bitxor(&self, rhs: impl ToLua) -> Result<Self>

Source

pub fn airth_shl(&self, rhs: impl ToLua) -> Result<Self>

Source

pub fn airth_shr(&self, rhs: impl ToLua) -> Result<Self>

Source

pub fn arith_neg(&self) -> Result<Self>

Source

pub fn arith_not(&self) -> Result<Self>

Source

pub fn idiv(&self, rhs: impl ToLua) -> Result<Self>

Source

pub fn pow(&self, rhs: impl ToLua) -> Result<Self>

Trait Implementations§

Source§

impl<'l, T: ToLua> Add<T> for &ValRef<'l>

Source§

type Output = Result<ValRef<'l>, Error>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: T) -> Self::Output

Performs the + operation. Read more
Source§

impl<'l, T: ToLua> Add<T> for ValRef<'l>

Source§

type Output = Result<ValRef<'l>, Error>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: T) -> Self::Output

Performs the + operation. Read more
Source§

impl<'l, T: ToLua> BitAnd<T> for &ValRef<'l>

Source§

type Output = Result<ValRef<'l>, Error>

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: T) -> Self::Output

Performs the & operation. Read more
Source§

impl<'l, T: ToLua> BitAnd<T> for ValRef<'l>

Source§

type Output = Result<ValRef<'l>, Error>

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: T) -> Self::Output

Performs the & operation. Read more
Source§

impl<'l, T: ToLua> BitOr<T> for &ValRef<'l>

Source§

type Output = Result<ValRef<'l>, Error>

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: T) -> Self::Output

Performs the | operation. Read more
Source§

impl<'l, T: ToLua> BitOr<T> for ValRef<'l>

Source§

type Output = Result<ValRef<'l>, Error>

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: T) -> Self::Output

Performs the | operation. Read more
Source§

impl<'l, T: ToLua> BitXor<T> for &ValRef<'l>

Source§

type Output = Result<ValRef<'l>, Error>

The resulting type after applying the ^ operator.
Source§

fn bitxor(self, rhs: T) -> Self::Output

Performs the ^ operation. Read more
Source§

impl<'l, T: ToLua> BitXor<T> for ValRef<'l>

Source§

type Output = Result<ValRef<'l>, Error>

The resulting type after applying the ^ operator.
Source§

fn bitxor(self, rhs: T) -> Self::Output

Performs the ^ operation. Read more
Source§

impl Clone for ValRef<'_>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'a> Debug for ValRef<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserializer<'de> for &'de ValRef<'_>

Source§

fn deserialize_any<V>(self, visitor: V) -> Result<V::Value, Self::Error>
where V: Visitor<'de>,

Require the Deserializer to figure out how to drive the visitor based on what data type is in the input.

When implementing Deserialize, you should avoid relying on Deserializer::deserialize_any unless you need to be told by the Deserializer what type is in the input. Know that relying on Deserializer::deserialize_any means your data type will be able to deserialize from self-describing formats only, ruling out Bincode and many others.

Source§

fn deserialize_bool<V>(self, visitor: V) -> Result<V::Value, Self::Error>
where V: Visitor<'de>,

Hint that the Deserialize type is expecting a bool value.

Source§

fn deserialize_i8<V>(self, visitor: V) -> Result<V::Value, Self::Error>
where V: Visitor<'de>,

Hint that the Deserialize type is expecting an i8 value.

Source§

fn deserialize_i16<V>(self, visitor: V) -> Result<V::Value, Self::Error>
where V: Visitor<'de>,

Hint that the Deserialize type is expecting an i16 value.

Source§

fn deserialize_i32<V>(self, visitor: V) -> Result<V::Value, Self::Error>
where V: Visitor<'de>,

Hint that the Deserialize type is expecting an i32 value.

Source§

fn deserialize_i64<V>(self, visitor: V) -> Result<V::Value, Self::Error>
where V: Visitor<'de>,

Hint that the Deserialize type is expecting an i64 value.

Source§

fn deserialize_u8<V>(self, visitor: V) -> Result<V::Value, Self::Error>
where V: Visitor<'de>,

Hint that the Deserialize type is expecting a u8 value.

Source§

fn deserialize_u16<V>(self, visitor: V) -> Result<V::Value, Self::Error>
where V: Visitor<'de>,

Hint that the Deserialize type is expecting a u16 value.

Source§

fn deserialize_u32<V>(self, visitor: V) -> Result<V::Value, Self::Error>
where V: Visitor<'de>,

Hint that the Deserialize type is expecting a u32 value.

Source§

fn deserialize_u64<V>(self, visitor: V) -> Result<V::Value, Self::Error>
where V: Visitor<'de>,

Hint that the Deserialize type is expecting a u64 value.

Source§

fn deserialize_f32<V>(self, visitor: V) -> Result<V::Value, Self::Error>
where V: Visitor<'de>,

Hint that the Deserialize type is expecting a f32 value.

Source§

fn deserialize_f64<V>(self, visitor: V) -> Result<V::Value, Self::Error>
where V: Visitor<'de>,

Hint that the Deserialize type is expecting a f64 value.

Source§

fn deserialize_char<V>(self, visitor: V) -> Result<V::Value, Self::Error>
where V: Visitor<'de>,

Hint that the Deserialize type is expecting a char value.

Source§

fn deserialize_str<V>(self, visitor: V) -> Result<V::Value, Self::Error>
where V: Visitor<'de>,

Hint that the Deserialize type is expecting a string value and does not benefit from taking ownership of buffered data owned by the Deserializer.

If the Visitor would benefit from taking ownership of String data, indiciate this to the Deserializer by using deserialize_string instead.

Source§

fn deserialize_string<V>(self, visitor: V) -> Result<V::Value, Self::Error>
where V: Visitor<'de>,

Hint that the Deserialize type is expecting a string value and would benefit from taking ownership of buffered data owned by the Deserializer.

If the Visitor would not benefit from taking ownership of String data, indicate that to the Deserializer by using deserialize_str instead.

Source§

fn deserialize_bytes<V>(self, visitor: V) -> Result<V::Value, Self::Error>
where V: Visitor<'de>,

Hint that the Deserialize type is expecting a byte array and does not benefit from taking ownership of buffered data owned by the Deserializer.

If the Visitor would benefit from taking ownership of Vec<u8> data, indicate this to the Deserializer by using deserialize_byte_buf instead.

Source§

fn deserialize_byte_buf<V>(self, visitor: V) -> Result<V::Value, Self::Error>
where V: Visitor<'de>,

Hint that the Deserialize type is expecting a byte array and would benefit from taking ownership of buffered data owned by the Deserializer.

If the Visitor would not benefit from taking ownership of Vec<u8> data, indicate that to the Deserializer by using deserialize_bytes instead.

Source§

fn deserialize_option<V>(self, visitor: V) -> Result<V::Value, Self::Error>
where V: Visitor<'de>,

Hint that the Deserialize type is expecting an optional value.

This allows deserializers that encode an optional value as a nullable value to convert the null value into None and a regular value into Some(value).

Source§

fn deserialize_unit<V>(self, visitor: V) -> Result<V::Value, Self::Error>
where V: Visitor<'de>,

Hint that the Deserialize type is expecting a unit value.

Source§

fn deserialize_unit_struct<V>( self, name: &'static str, visitor: V, ) -> Result<V::Value, Self::Error>
where V: Visitor<'de>,

Hint that the Deserialize type is expecting a unit struct with a particular name.

Source§

fn deserialize_newtype_struct<V>( self, name: &'static str, visitor: V, ) -> Result<V::Value, Self::Error>
where V: Visitor<'de>,

Hint that the Deserialize type is expecting a newtype struct with a particular name.

Source§

fn deserialize_seq<V>(self, visitor: V) -> Result<V::Value, Self::Error>
where V: Visitor<'de>,

Hint that the Deserialize type is expecting a sequence of values.

Source§

fn deserialize_tuple<V>( self, len: usize, visitor: V, ) -> Result<V::Value, Self::Error>
where V: Visitor<'de>,

Hint that the Deserialize type is expecting a sequence of values and knows how many values there are without looking at the serialized data.

Source§

fn deserialize_tuple_struct<V>( self, name: &'static str, len: usize, visitor: V, ) -> Result<V::Value, Self::Error>
where V: Visitor<'de>,

Hint that the Deserialize type is expecting a tuple struct with a particular name and number of fields.

Source§

fn deserialize_map<V>(self, visitor: V) -> Result<V::Value, Self::Error>
where V: Visitor<'de>,

Hint that the Deserialize type is expecting a map of key-value pairs.

Source§

fn deserialize_struct<V>( self, name: &'static str, fields: &'static [&'static str], visitor: V, ) -> Result<V::Value, Self::Error>
where V: Visitor<'de>,

Hint that the Deserialize type is expecting a struct with a particular name and fields.

Source§

fn deserialize_enum<V>( self, name: &'static str, variants: &'static [&'static str], visitor: V, ) -> Result<V::Value, Self::Error>
where V: Visitor<'de>,

Hint that the Deserialize type is expecting an enum value with a particular name and possible variants.

Source§

fn deserialize_identifier<V>(self, visitor: V) -> Result<V::Value, Self::Error>
where V: Visitor<'de>,

Hint that the Deserialize type is expecting the name of a struct field or the discriminant of an enum variant.

Source§

fn deserialize_ignored_any<V>(self, visitor: V) -> Result<V::Value, Self::Error>
where V: Visitor<'de>,

Hint that the Deserialize type needs to deserialize a value whose type doesn’t matter because it is ignored.

Deserializers for non-self-describing formats may not support this mode.

Source§

type Error = DesErr

The error type that can be returned if some error occurs during deserialization.
Source§

fn deserialize_i128<V>( self, visitor: V, ) -> Result<<V as Visitor<'de>>::Value, Self::Error>
where V: Visitor<'de>,

Hint that the Deserialize type is expecting an i128 value. Read more
Source§

fn deserialize_u128<V>( self, visitor: V, ) -> Result<<V as Visitor<'de>>::Value, Self::Error>
where V: Visitor<'de>,

Hint that the Deserialize type is expecting an u128 value. Read more
Source§

fn is_human_readable(&self) -> bool

Determine whether Deserialize implementations should expect to deserialize their human-readable form. Read more
Source§

impl<'l, T: ToLua> Div<T> for &ValRef<'l>

Source§

type Output = Result<ValRef<'l>, Error>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: T) -> Self::Output

Performs the / operation. Read more
Source§

impl<'l, T: ToLua> Div<T> for ValRef<'l>

Source§

type Output = Result<ValRef<'l>, Error>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: T) -> Self::Output

Performs the / operation. Read more
Source§

impl Drop for ValRef<'_>

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl<'a> FromLua<'a> for ValRef<'a>

Source§

fn from_lua(s: &'a State, val: ValRef<'a>) -> Result<Self>

Source§

const TYPE_NAME: &'static str = _

Source§

impl<'a> Into<ValRef<'a>> for Function<'a>

Source§

fn into(self) -> ValRef<'a>

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

impl<'a> Into<ValRef<'a>> for LuaString<'a>

Source§

fn into(self) -> ValRef<'a>

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

impl<'a> Into<ValRef<'a>> for LuaThread<'a>

Source§

fn into(self) -> ValRef<'a>

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

impl<'a> Into<ValRef<'a>> for LuaUserData<'a>

Source§

fn into(self) -> ValRef<'a>

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

impl<'a> Into<ValRef<'a>> for Table<'a>

Source§

fn into(self) -> ValRef<'a>

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

impl<'l, T: ToLua> Mul<T> for &ValRef<'l>

Source§

type Output = Result<ValRef<'l>, Error>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: T) -> Self::Output

Performs the * operation. Read more
Source§

impl<'l, T: ToLua> Mul<T> for ValRef<'l>

Source§

type Output = Result<ValRef<'l>, Error>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: T) -> Self::Output

Performs the * operation. Read more
Source§

impl<'l> Neg for &ValRef<'l>

Source§

type Output = Result<ValRef<'l>, Error>

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
Source§

impl<'l> Neg for ValRef<'l>

Source§

type Output = Result<ValRef<'l>, Error>

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
Source§

impl<'l> Not for &ValRef<'l>

Source§

type Output = Result<ValRef<'l>, Error>

The resulting type after applying the ! operator.
Source§

fn not(self) -> Self::Output

Performs the unary ! operation. Read more
Source§

impl<'l> Not for ValRef<'l>

Source§

type Output = Result<ValRef<'l>, Error>

The resulting type after applying the ! operator.
Source§

fn not(self) -> Self::Output

Performs the unary ! operation. Read more
Source§

impl PartialEq for ValRef<'_>

Source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<'l, T: ToLua> Rem<T> for &ValRef<'l>

Source§

type Output = Result<ValRef<'l>, Error>

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: T) -> Self::Output

Performs the % operation. Read more
Source§

impl<'l, T: ToLua> Rem<T> for ValRef<'l>

Source§

type Output = Result<ValRef<'l>, Error>

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: T) -> Self::Output

Performs the % operation. Read more
Source§

impl Serialize for ValRef<'_>

Source§

fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error>

Serialize this value into the given Serde serializer. Read more
Source§

impl<'l, T: ToLua> Shl<T> for &ValRef<'l>

Source§

type Output = Result<ValRef<'l>, Error>

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: T) -> Self::Output

Performs the << operation. Read more
Source§

impl<'l, T: ToLua> Shl<T> for ValRef<'l>

Source§

type Output = Result<ValRef<'l>, Error>

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: T) -> Self::Output

Performs the << operation. Read more
Source§

impl<'l, T: ToLua> Shr<T> for &ValRef<'l>

Source§

type Output = Result<ValRef<'l>, Error>

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: T) -> Self::Output

Performs the >> operation. Read more
Source§

impl<'l, T: ToLua> Shr<T> for ValRef<'l>

Source§

type Output = Result<ValRef<'l>, Error>

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: T) -> Self::Output

Performs the >> operation. Read more
Source§

impl<'l, T: ToLua> Sub<T> for &ValRef<'l>

Source§

type Output = Result<ValRef<'l>, Error>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: T) -> Self::Output

Performs the - operation. Read more
Source§

impl<'l, T: ToLua> Sub<T> for ValRef<'l>

Source§

type Output = Result<ValRef<'l>, Error>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: T) -> Self::Output

Performs the - operation. Read more
Source§

impl ToLua for &ValRef<'_>

Source§

fn to_lua<'a>(self, lua: &'a State) -> Result<ValRef<'a>>

Source§

impl ToLua for ValRef<'_>

Source§

fn to_lua<'a>(self, lua: &'a State) -> Result<ValRef<'a>>

Source§

impl<'a> TryFrom<ValRef<'a>> for Function<'a>

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(val: ValRef<'a>) -> Result<Self>

Performs the conversion.
Source§

impl<'a> TryFrom<ValRef<'a>> for LuaString<'a>

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(val: ValRef<'a>) -> Result<Self>

Performs the conversion.
Source§

impl<'a> TryFrom<ValRef<'a>> for LuaThread<'a>

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(val: ValRef<'a>) -> Result<Self>

Performs the conversion.
Source§

impl<'a> TryFrom<ValRef<'a>> for LuaUserData<'a>

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(val: ValRef<'a>) -> Result<Self>

Performs the conversion.
Source§

impl<'a> TryFrom<ValRef<'a>> for Table<'a>

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(val: ValRef<'a>) -> Result<Self>

Performs the conversion.

Auto Trait Implementations§

§

impl<'a> Freeze for ValRef<'a>

§

impl<'a> !RefUnwindSafe for ValRef<'a>

§

impl<'a> !Send for ValRef<'a>

§

impl<'a> !Sync for ValRef<'a>

§

impl<'a> Unpin for ValRef<'a>

§

impl<'a> !UnwindSafe for ValRef<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<'a, T> FromLuaMulti<'a> for T
where T: FromLua<'a>,

Source§

const COUNT: usize = 1usize

Source§

fn from_lua_multi(s: &'a State, begin: i32) -> Result<T, Error>

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> ToLuaMulti for T
where T: ToLua,

Source§

const VALUE_COUNT: Option<usize> = const VALUE_COUNT: Option<usize> = Some(1);

Count of values to be pushed to lua stack
Source§

fn push_multi(self, s: &State) -> Result<usize, Error>

Define how to push values onto lua stack
Source§

fn value_count(&self) -> Option<usize>

Get the count of values to be pushed to lua stack, with self instance
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.