pub struct SerdeWrappedValue<T>(pub T);
Expand description
Helper wrapper type for passing/returning serde encoded values from/to lua
Tuple Fields§
§0: T
Implementations§
Source§impl<T: Serialize> SerdeWrappedValue<T>
impl<T: Serialize> SerdeWrappedValue<T>
pub fn to_lua_value(&self, lua: &Lua) -> Result<Value>
Trait Implementations§
Source§impl<T> Deref for SerdeWrappedValue<T>
impl<T> Deref for SerdeWrappedValue<T>
Source§impl<T> DerefMut for SerdeWrappedValue<T>
impl<T> DerefMut for SerdeWrappedValue<T>
Source§impl<T: DeserializeOwned> FromLua for SerdeWrappedValue<T>
impl<T: DeserializeOwned> FromLua for SerdeWrappedValue<T>
Source§fn from_lua(value: Value, lua: &Lua) -> Result<SerdeWrappedValue<T>>
fn from_lua(value: Value, lua: &Lua) -> Result<SerdeWrappedValue<T>>
Performs the conversion.
Auto Trait Implementations§
impl<T> Freeze for SerdeWrappedValue<T>where
T: Freeze,
impl<T> RefUnwindSafe for SerdeWrappedValue<T>where
T: RefUnwindSafe,
impl<T> Send for SerdeWrappedValue<T>where
T: Send,
impl<T> Sync for SerdeWrappedValue<T>where
T: Sync,
impl<T> Unpin for SerdeWrappedValue<T>where
T: Unpin,
impl<T> UnwindSafe for SerdeWrappedValue<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
§impl<T> FromLuaMulti for Twhere
T: FromLua,
impl<T> FromLuaMulti for Twhere
T: FromLua,
§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>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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§impl<T> IntoLuaMulti for Twhere
T: IntoLua,
impl<T> IntoLuaMulti for Twhere
T: IntoLua,
§fn into_lua_multi(self, lua: &Lua) -> Result<MultiValue, Error>
fn into_lua_multi(self, lua: &Lua) -> Result<MultiValue, Error>
Performs the conversion.