Trait Script

Source
pub trait Script {
    // Required method
    fn info(&self, _: &mut Vec<Info>, _: &mut Vec<ScriptArg>);

    // Provided methods
    fn join<T: Script>(self, other: T) -> ScriptJoin<Self, T>
       where Self: Sized { ... }
    fn invoke<T>(self, con: &mut dyn ConnectionLike) -> RedisResult<T>
       where T: FromRedisValue,
             Self: Sized { ... }
    fn invoke_async<'a, C, T>(self, con: &'a mut C) -> RedisFuture<'a, T>
       where C: ConnectionLike + Send,
             T: FromRedisValue + Send,
             Self: Sized + Send + 'a { ... }
}
Expand description

Represents a complete invocable script which has a complete set of arguments.

Required Methods§

Source

fn info(&self, _: &mut Vec<Info>, _: &mut Vec<ScriptArg>)

Retrieve all the script information.

Provided Methods§

Source

fn join<T: Script>(self, other: T) -> ScriptJoin<Self, T>
where Self: Sized,

Join another script making self as inner.

Source

fn invoke<T>(self, con: &mut dyn ConnectionLike) -> RedisResult<T>
where T: FromRedisValue, Self: Sized,

Invoke the script.

Source

fn invoke_async<'a, C, T>(self, con: &'a mut C) -> RedisFuture<'a, T>
where C: ConnectionLike + Send, T: FromRedisValue + Send, Self: Sized + Send + 'a,

Invoke the script asynchronously.

Implementations on Foreign Types§

Source§

impl Script for ()

Source§

fn info(&self, _: &mut Vec<Info>, _: &mut Vec<ScriptArg>)

Source§

impl<S: Script + ?Sized> Script for Box<S>

Source§

fn info(&self, infos: &mut Vec<Info>, args: &mut Vec<ScriptArg>)

Implementors§

Source§

impl<S, T> Script for ScriptJoin<S, T>
where S: Script, T: Script,