[][src]Crate automaat_processor_print_output

An Automaat processor to print a string output.

Using this crate in your Automaat workflow allows you to return the string provided to the processor's configuration.

On its own, this is not very useful, but combined with an application like Automaat Server, you can allow pipelines to configure this processor on runtime, and relay the output to the end-user.

Examples

Configure the processor with a string, and capture that same value as the output of the processor.

This processor is infallible (see Void), so unwrapping the returned value will never panic.

use automaat_core::{Context, Processor};
use automaat_processor_print_output::PrintOutput;

let context = Context::new()?;
let hello = "hello world".to_owned();

let processor = PrintOutput {
  output: hello.clone(),
};

let output = processor.run(&context).unwrap();

assert_eq!(output, Some(hello));

Package Features

  • juniper – creates a set of objects to be used in GraphQL-based requests/responses.

Structs

PrintOutput

The processor configuration.

Enums

Void

This is an enum without a variant, and can therefor never exist as a value on runtime. This is also known as an uninhabited type, it statically proofs that Processor::run and Processor::validate are infallible for PrintOutput.