pub struct UserDataRef<T>where
T: 'static,{ /* private fields */ }
Available on crate feature
mlua
only.Expand description
A wrapper type for a userdata value that provides read access.
It implements FromLua
and can be used to receive a typed userdata from Lua.
Trait Implementations§
Source§impl<T> Debug for UserDataRef<T>where
T: Debug,
impl<T> Debug for UserDataRef<T>where
T: Debug,
Source§impl<T> Deref for UserDataRef<T>
impl<T> Deref for UserDataRef<T>
Source§impl<T> Display for UserDataRef<T>where
T: Display,
impl<T> Display for UserDataRef<T>where
T: Display,
Source§impl<T> FromLua for UserDataRef<T>where
T: 'static,
impl<T> FromLua for UserDataRef<T>where
T: 'static,
Auto Trait Implementations§
impl<T> Freeze for UserDataRef<T>
impl<T> !RefUnwindSafe for UserDataRef<T>
impl<T> !Send for UserDataRef<T>
impl<T> !Sync for UserDataRef<T>
impl<T> Unpin for UserDataRef<T>
impl<T> !UnwindSafe for UserDataRef<T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> FromLuaMulti for Twhere
T: FromLua,
impl<T> FromLuaMulti for Twhere
T: FromLua,
Source§fn from_lua_multi(values: MultiValue, lua: &Lua) -> Result<T, Error>
fn from_lua_multi(values: MultiValue, lua: &Lua) -> Result<T, Error>
Performs the conversion. Read more
fn from_lua_args( args: MultiValue, i: usize, to: Option<&str>, lua: &Lua, ) -> Result<T, Error>
unsafe fn from_stack_multi(nvals: i32, lua: &RawLua) -> Result<T, Error>
unsafe fn from_stack_args( nargs: i32, i: usize, to: Option<&str>, lua: &RawLua, ) -> Result<T, Error>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
Source§type Error = Infallible
type Error = Infallible
The error type in the returned
Result
.Source§fn into_result(self) -> Result<T, <T as IntoResult<T>>::Error>
fn into_result(self) -> Result<T, <T as IntoResult<T>>::Error>
Converts the value into a
Result
.