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 Freeze for InsideCallback
impl RefUnwindSafe for InsideCallback
impl !Send for InsideCallback
impl !Sync for InsideCallback
impl Unpin for InsideCallback
impl UnsafeUnpin 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