Module skytable::actions[][src]

Expand description

Actions

This module contains traits for running actions. To run actions:

  • For the sync feature, add this import:
    use skytable::actions::Actions;
  • For the async feature, add this import:
    use skytable::actions::AsyncActions;

Running actions

Once you have imported the required traits, you can now run the actions! For example:

use skytable::{actions::Actions, Connection};
fn main() {
    let mut con = Connection::new("127.0.0.1", 2003).unwrap();
    con.set("x", "100").unwrap();
    assert_eq!(con.get("x").unwrap(), "100".to_owned());
}

Enums

ActionError

Errors while running actions

Constants

ERR_SNAPSHOT_BUSY

The error string returned when the snapshot engine is busy

ERR_SNAPSHOT_DISABLED

The error string returned when periodic snapshots are busy

Traits

Actionssync

Actions that can be run on a [SyncSocket] connection

AsyncActionsasync

Actions that can be run on an [AsyncSocket] connection

Type Definitions

ActionResult

A special result that is returned when running actions

AsyncResultasync

A special result that is returned when running actions (async)