pub struct UserDataOwned<T>(pub T);Expand description
A wrapper type that takes ownership of a userdata value.
It implements FromLua and can be used to receive a typed userdata from Lua by taking
ownership of it.
The original Lua userdata is marked as destructed and cannot be used further.
Tuple Fields§
§0: TTrait Implementations§
Source§impl<T: Debug> Debug for UserDataOwned<T>
impl<T: Debug> Debug for UserDataOwned<T>
Source§impl<T> Deref for UserDataOwned<T>
impl<T> Deref for UserDataOwned<T>
Source§impl<T> DerefMut for UserDataOwned<T>
impl<T> DerefMut for UserDataOwned<T>
Source§impl<T: Display> Display for UserDataOwned<T>
impl<T: Display> Display for UserDataOwned<T>
Auto Trait Implementations§
impl<T> Freeze for UserDataOwned<T>where
T: Freeze,
impl<T> RefUnwindSafe for UserDataOwned<T>where
T: RefUnwindSafe,
impl<T> Send for UserDataOwned<T>where
T: Send,
impl<T> Sync for UserDataOwned<T>where
T: Sync,
impl<T> Unpin for UserDataOwned<T>where
T: Unpin,
impl<T> UnsafeUnpin for UserDataOwned<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for UserDataOwned<T>where
T: UnwindSafe,
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 more