Struct tlua::InsideCallback
source · pub struct InsideCallback(/* private fields */);
Expand description
Opaque type that represents the Lua context when inside a callback.
Some types (like Result
) can only be returned from a callback and not written inside a
Lua variable. This type is here to enforce this restriction.
Trait Implementations§
source§impl AsLua for InsideCallback
impl AsLua for InsideCallback
fn as_lua(&self) -> LuaState
source§fn try_push<T>(
self,
v: T
) -> Result<PushGuard<Self>, (<T as PushInto<Self>>::Err, Self)>
fn try_push<T>( self, v: T ) -> Result<PushGuard<Self>, (<T as PushInto<Self>>::Err, Self)>
Try to push
v
onto the lua stack. Read moresource§fn try_push_one<T>(
self,
v: T
) -> Result<PushGuard<Self>, (<T as PushInto<Self>>::Err, Self)>where
Self: Sized,
T: PushOneInto<Self>,
fn try_push_one<T>(
self,
v: T
) -> Result<PushGuard<Self>, (<T as PushInto<Self>>::Err, Self)>where
Self: Sized,
T: PushOneInto<Self>,
Try to push
v
onto the lua stack. Read moresource§fn push_iter<I>(self, iterator: I) -> Result<PushGuard<Self>, Self>
fn push_iter<I>(self, iterator: I) -> Result<PushGuard<Self>, Self>
Push
iterator
onto the lua stack as a lua table. Read moresource§fn try_push_iter<I>(
self,
iterator: I
) -> Result<PushGuard<Self>, (PushIterErrorOf<I>, Self)>
fn try_push_iter<I>( self, iterator: I ) -> Result<PushGuard<Self>, (PushIterErrorOf<I>, Self)>
Push
iterator
onto the lua stack as a lua table. Read morefn read<T>(self) -> ReadResult<T, Self>
fn read_at<T>(self, index: i32) -> ReadResult<T, Self>
fn read_at_nz<T>(self, index: NonZeroI32) -> ReadResult<T, Self>
source§impl Debug for InsideCallback
impl Debug for InsideCallback
source§impl<T, E> PushInto<InsideCallback> for Result<T, E>
impl<T, E> PushInto<InsideCallback> for Result<T, E>
type Err = <T as PushInto<InsideCallback>>::Err
source§fn push_into_lua(
self,
lua: InsideCallback
) -> Result<PushGuard<InsideCallback>, (T::Err, InsideCallback)>
fn push_into_lua( self, lua: InsideCallback ) -> Result<PushGuard<InsideCallback>, (T::Err, InsideCallback)>
Push the value into lua by value
source§impl<T, E> PushInto<InsideCallback> for Result<T, Throw<E>>
impl<T, E> PushInto<InsideCallback> for Result<T, Throw<E>>
type Err = <T as PushInto<InsideCallback>>::Err
source§fn push_into_lua(
self,
lua: InsideCallback
) -> Result<PushGuard<InsideCallback>, (T::Err, InsideCallback)>
fn push_into_lua( self, lua: InsideCallback ) -> Result<PushGuard<InsideCallback>, (T::Err, InsideCallback)>
Push the value into lua by value
impl<T, E> PushOneInto<InsideCallback> for Result<T, E>
Auto Trait Implementations§
impl RefUnwindSafe for InsideCallback
impl !Send for InsideCallback
impl !Sync for InsideCallback
impl Unpin for InsideCallback
impl UnwindSafe for InsideCallback
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