formatter_for

Function formatter_for 

Source
pub fn formatter_for(format: OutputFormat) -> Box<dyn OutputFormatter>
Expand description

Return the appropriate OutputFormatter boxed for the given format.

ยงExample

use stygian_graph::adapters::output_format::{formatter_for, CsvFormatter};
use stygian_graph::ports::storage::OutputFormat;

let f = formatter_for(OutputFormat::Csv);
assert_eq!(f.format_type(), OutputFormat::Csv);