[][src]Struct automaat_processor_redis_command::RedisCommand

pub struct RedisCommand {
    pub command: String,
    pub arguments: Option<Vec<String>>,
    pub url: Url,
}

The processor configuration.

Fields

command: String

The main Redis command to execute.

See the main Redis documentation for a list of available commands.

arguments: Option<Vec<String>>

The arguments belonging to the main command.

The acceptable value of these arguments depends on the command being executed.

url: Url

The URL of the Redis server.

See the redis-rs "connection parameters" documentation for more details.

Trait Implementations

impl Eq for RedisCommand[src]

impl PartialEq<RedisCommand> for RedisCommand[src]

impl Clone for RedisCommand[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for RedisCommand[src]

impl<'a> Processor<'a> for RedisCommand[src]

type Error = Error

If a processor fails its intended purpose, the returned error is turned into a string, and shown in the automaat-web-client application. Read more

type Output = String

The processor can return any (successful) output it wants, as long as that type implements the [std::fmt::Display] trait. Read more

fn run(&self, _context: &Context) -> Result<Option<Self::Output>, Self::Error>[src]

Run the configured Redis command, and return its results.

Output

The value returned by the Redis server is fairly untyped, and not always easily represented in the final output. In general, the most common values are correctly mapped, such as Nil becoming None, and all valid UTF-8 data is returned as Some, containing the data as a string.

Any value that cannot be coerced into a valid UTF-8 string, is represented in the best possible way as a valid UTF-8 string, but won't completely match the original output of Redis.

Errors

See the Error enum for all possible error values that can be returned. These values wrap the redis::ErrorKind values.

fn validate(&self) -> Result<(), Self::Error>[src]

The validate method is used by the automaat-server application to do a runtime check to make sure that the processor is correctly configured before running it. Read more

impl<'de> Deserialize<'de> for RedisCommand[src]

impl Serialize for RedisCommand[src]

Auto Trait Implementations

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> Erased for T