Docs.rs
  • actix-lua-0.7.0
    • actix-lua 0.7.0
    • Permalink
    • Docs.rs crate page
    • MIT
    • Links
    • Repository
    • crates.io
    • Source
    • Owners
    • poga
    • Dependencies
      • actix ^0.7 normal
      • futures ^0.1 normal
      • regex ^1 normal
      • rlua ^0.16 normal
      • tokio ^0.1 normal
      • uuid ^0.6 normal
      • futures-timer ^0.1 dev
    • Versions
    • 28.57% of the crate is documented
  • Platform
    • i686-unknown-linux-gnu
    • x86_64-unknown-linux-gnu
  • Feature flags
  • docs.rs
    • About docs.rs
    • Privacy policy
  • Rust
    • Rust website
    • The Book
    • Standard Library API Reference
    • Rust by Example
    • The Cargo Guide
    • Clippy Documentation

Crate actix_lua

actix_lua0.7.0

  • All Items

Sections

  • actix-lua: Lua scripting for actix
  • The LuaActor object
  • The LuaMessage type

Crate Items

  • Modules
  • Structs
  • Enums

Crates

  • actix_lua

Crate actix_lua

Source
Expand description

§actix-lua: Lua scripting for actix

The actix-lua crate provides a safe Lua programming language scripting enviroment for actix, an actor framework.

§The LuaActor object

The main type exported by this library is the LuaActor struct.

You should create LuaActor with LuaActorBuilder.

extern crate actix_lua;
extern crate actix;

use actix_lua::{LuaActorBuilder};
use actix::Actor;

let addr = LuaActorBuilder::new()
    .on_handle_with_lua(r#"return ctx.msg + 42"#)
    .build()
    .unwrap()
    .start();

§The LuaMessage type

LuaActor can only send/receive messages with type LuaMessage. It can be converted from/to primitive types such as i64, String, and HashMap with LuaMessage::from.

Modules§

dev
Re-export rlua interface for library developers

Structs§

LuaActor
Top level struct which holds a lua state for itself.
LuaActorBuilder
LuaActorBuilder creates a new LuaActor with given Lua script.

Enums§

LuaMessage

Results

Settings
Help
    struct
    actix_lua::dev::rlua::Table
    Handle to an internal Lua table.
    enum variant
    actix_lua::dev::rlua::Value::Table
    Reference to a Lua table.
    enum variant
    actix_lua::LuaMessage::Table
    assoc const
    actix_lua::dev::rlua::StdLib::TABLE
    struct
    actix_lua::dev::rlua::TablePairs
    An iterator over the pairs of a Lua table.
    struct
    actix_lua::dev::rlua::TableSequence
    An iterator over the sequence part of a Lua table.
    struct
    actix_lua::dev::rlua::prelude::LuaTable
    Handle to an internal Lua table.
    struct
    actix_lua::dev::rlua::prelude::LuaTablePairs
    An iterator over the pairs of a Lua table.
    struct
    actix_lua::dev::rlua::prelude::LuaTableSequence
    An iterator over the sequence part of a Lua table.
    method
    actix_lua::dev::rlua::Context::create_table
    Creates and returns a new table.
    method
    actix_lua::dev::rlua::Context::create_table_from
    Creates a table and fills it with values from an iterator.
    method
    actix_lua::dev::rlua::Table::get_metatable
    Returns a reference to the metatable of this table, or None…
    method
    actix_lua::dev::rlua::Table::set_metatable
    Sets or removes the metatable of this table.
    method
    actix_lua::dev::rlua::Table::clone
    &Table -> Table
    method
    actix_lua::dev::rlua::Table::raw_len
    &Table -> i64
    Returns the result of the Lua # operator, without invoking …
    method
    actix_lua::dev::rlua::Table::get_metatable
    &Table -> Option<Table>
    Returns a reference to the metatable of this table, or None…
    method
    actix_lua::dev::rlua::Table::sequence_values
    Table -> TableSequence<V>
    Consume this table and return an iterator over all values …
    method
    actix_lua::dev::rlua::Table::len
    &Table -> Result<i64, Error>
    Returns the result of the Lua # operator.
    method
    actix_lua::dev::rlua::Table::to_lua
    Table, Context -> Result<Value, Error>
    method
    actix_lua::dev::rlua::Table::set_metatable
    &Table, Option<Table> -> ()
    Sets or removes the metatable of this table.
    method
    actix_lua::dev::rlua::Table::pairs
    Table -> TablePairs<K, V>
    Consume this table and return an iterator over the pairs …
    method
    actix_lua::dev::rlua::Table::contains_key
    &Table, K -> Result<bool, Error>
    Checks whether the table contains a non-nil value for key.
    method
    actix_lua::dev::rlua::Table::fmt
    &Table, &mut Formatter -> Result<(), Error>
    method
    actix_lua::dev::rlua::Table::get
    &Table, K -> Result<V, Error>
    Gets the value associated to key from the table.
    method
    actix_lua::dev::rlua::Table::raw_get
    &Table, K -> Result<V, Error>
    Gets the value associated to key without invoking …
    method
    actix_lua::dev::rlua::Table::set
    &Table, K, V -> Result<(), Error>
    Sets a key-value pair in the table.
    method
    actix_lua::dev::rlua::Table::raw_set
    &Table, K, V -> Result<(), Error>
    Sets a key-value pair without invoking metamethods.
    method
    actix_lua::dev::rlua::Context::globals
    Context -> Table
    Returns a handle to the global environment.
    method
    actix_lua::dev::rlua::Context::create_table
    Context -> Result<Table, Error>
    Creates and returns a new table.
    method
    actix_lua::dev::rlua::Table::from_lua
    Value, Context -> Result<Table, Error>
    method
    actix_lua::dev::rlua::Context::create_sequence_from
    Context, I -> Result<Table, Error>
    Creates a table from an iterator of values, using 1.. as …
    method
    actix_lua::dev::rlua::Context::create_table_from
    Context, I -> Result<Table, Error>
    Creates a table and fills it with values from an iterator.
    method
    actix_lua::dev::rlua::Table::clone
    &Table -> Table
    method
    actix_lua::dev::rlua::Table::get_metatable
    &Table -> Option<Table>
    Returns a reference to the metatable of this table, or None…