Function alog::run[][src]

pub fn run(config: &Config<'_>, ioconfig: &IOConfig<'_>)
Expand description

Creates a reader (defaults to std::io::Stdin) and writer (defaults to std::io::Stdout) from alog::IOConfig and uses both along with alog::Config to actually replace any first word in reader with strings stored in alog::Config.

Errors

Exits when the output already exists or the new reader / writer retruns an error.

Example

extern crate alog;

fn main() {
    alog::run(
        &alog::Config {
            host: "XXX",
            ..Default::default()
        },
        &alog::IOConfig::default()
    );
}