pub struct Function<A, R>(_, _, _);Expand description
Handle to a Lua function either created from Rust or deserialized from Lua.
Implementations
sourceimpl<A, R> Function<A, R>
impl<A, R> Function<A, R>
pub fn from_fn<F>(fun: F) -> Self where
A: LuaPoppable,
R: LuaPushable,
F: Fn(A) -> Result<R> + 'static,
pub fn from_fn_mut<F>(fun: F) -> Self where
A: LuaPoppable,
R: LuaPushable,
F: FnMut(A) -> Result<R> + 'static,
pub fn from_fn_once<F>(fun: F) -> Self where
A: LuaPoppable,
R: LuaPushable,
F: FnOnce(A) -> Result<R> + 'static,
Trait Implementations
sourceimpl<'de, A, R> Deserialize<'de> for Function<A, R>
impl<'de, A, R> Deserialize<'de> for Function<A, R>
sourcefn deserialize<D>(deserializer: D) -> StdResult<Self, D::Error> where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> StdResult<Self, D::Error> where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl<A, R> FromObject for Function<A, R>
impl<A, R> FromObject for Function<A, R>
impl<A: Eq, R: Eq> Eq for Function<A, R>
impl<A, R> StructuralEq for Function<A, R>
impl<A, R> StructuralPartialEq for Function<A, R>
Auto Trait Implementations
impl<A, R> RefUnwindSafe for Function<A, R> where
A: RefUnwindSafe,
R: RefUnwindSafe,
impl<A, R> Send for Function<A, R> where
A: Send,
R: Send,
impl<A, R> Sync for Function<A, R> where
A: Sync,
R: Sync,
impl<A, R> Unpin for Function<A, R> where
A: Unpin,
R: Unpin,
impl<A, R> UnwindSafe for Function<A, R> where
A: UnwindSafe,
R: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more