pub enum Command<'lua> {
VimScript(String),
Lua(LuaFunction<'lua>),
}Variants
VimScript(String)
Lua(LuaFunction<'lua>)
Implementations
sourceimpl<'lua> Command<'lua>
impl<'lua> Command<'lua>
pub fn from_fn(
lua: &'lua Lua,
callback: impl Fn(&'lua Lua, CommandCallbackData) + 'static + Send
) -> Self
pub fn from_fn_async<F: Future<Output = ()> + 'lua>(
lua: &'lua Lua,
callback: impl Fn(&'lua Lua, CommandCallbackData) -> F + 'static + Send + Clone
) -> Self
pub fn from_fn_mut(
lua: &'lua Lua,
callback: impl FnMut(CommandCallbackData) + 'static + Send
) -> Self
Trait Implementations
sourceimpl<'lua> From<Function<'lua>> for Command<'lua>
impl<'lua> From<Function<'lua>> for Command<'lua>
sourcefn from(original: LuaFunction<'lua>) -> Command<'lua>
fn from(original: LuaFunction<'lua>) -> Command<'lua>
Converts to this type from the input type.
Auto Trait Implementations
impl<'lua> !RefUnwindSafe for Command<'lua>
impl<'lua> !Send for Command<'lua>
impl<'lua> !Sync for Command<'lua>
impl<'lua> Unpin for Command<'lua>
impl<'lua> !UnwindSafe for Command<'lua>
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
sourceimpl<'lua, T> ToLuaMulti<'lua> for T where
T: ToLua<'lua>,
impl<'lua, T> ToLuaMulti<'lua> for T where
T: ToLua<'lua>,
sourcefn to_lua_multi(self, lua: &'lua Lua) -> Result<MultiValue<'lua>, Error>
fn to_lua_multi(self, lua: &'lua Lua) -> Result<MultiValue<'lua>, Error>
Performs the conversion.
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more