1 unstable release
0.1.0 | Jun 9, 2019 |
---|
#5 in #automaat
Used in automaat-server
18KB
191 lines
Automaat Processor: Print Output
🚧 Work In Progress 🚧
lib.rs
:
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.
Dependencies
~2–12MB
~162K SLoC