Struct tlua::InsideCallback
source · pub struct InsideCallback(_);
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)>where
Self: Sized,
T: PushInto<Self>,
fn try_push<T>( self, v: T ) -> Result<PushGuard<Self>, (<T as PushInto<Self>>::Err, Self)>where Self: Sized, T: PushInto<Self>,
Try to push
v
onto the lua stack. Read moresource§fn push<T>(self, v: T) -> PushGuard<Self>where
Self: Sized,
T: PushInto<Self>,
<T as PushInto<Self>>::Err: Into<Void>,
fn push<T>(self, v: T) -> PushGuard<Self>where Self: Sized, T: PushInto<Self>, <T as PushInto<Self>>::Err: Into<Void>,
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_one<T>(self, v: T) -> PushGuard<Self>where
Self: Sized,
T: PushOneInto<Self>,
<T as PushInto<Self>>::Err: Into<Void>,
fn push_one<T>(self, v: T) -> PushGuard<Self>where Self: Sized, T: PushOneInto<Self>, <T as PushInto<Self>>::Err: Into<Void>,
Push
v
onto the lua stack. Read moresource§fn push_iter<I>(self, iterator: I) -> Result<PushGuard<Self>, Self>where
Self: Sized,
I: Iterator,
<I as Iterator>::Item: PushInto<LuaState>,
<<I as Iterator>::Item as PushInto<LuaState>>::Err: Into<Void>,
fn push_iter<I>(self, iterator: I) -> Result<PushGuard<Self>, Self>where Self: Sized, I: Iterator, <I as Iterator>::Item: PushInto<LuaState>, <<I as Iterator>::Item as PushInto<LuaState>>::Err: Into<Void>,
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)>where
Self: Sized,
I: Iterator,
<I as Iterator>::Item: PushInto<LuaState>,
fn try_push_iter<I>( self, iterator: I ) -> Result<PushGuard<Self>, (PushIterErrorOf<I>, Self)>where Self: Sized, I: Iterator, <I as Iterator>::Item: PushInto<LuaState>,
Push
iterator
onto the lua stack as a lua table. Read morefn read<T>(self) -> ReadResult<T, Self>where Self: Sized, T: LuaRead<Self>,
fn read_at<T>(self, index: i32) -> ReadResult<T, Self>where Self: Sized, T: LuaRead<Self>,
fn read_at_nz<T>(self, index: NonZeroI32) -> ReadResult<T, Self>where Self: Sized, T: LuaRead<Self>,
source§impl Debug for InsideCallback
impl Debug for InsideCallback
source§impl<T, E> PushInto<InsideCallback> for Result<T, E>where
T: PushInto<InsideCallback>,
E: Display,
impl<T, E> PushInto<InsideCallback> for Result<T, E>where T: PushInto<InsideCallback>, E: Display,
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>>where
T: PushInto<InsideCallback>,
E: Display,
impl<T, E> PushInto<InsideCallback> for Result<T, Throw<E>>where T: PushInto<InsideCallback>, E: Display,
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>where T: PushOneInto<InsideCallback>, E: Display,
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