Crate kwp

Source
Expand description

An input parser for positive and negative keywords input (e.g: +foo,-bar,+baz)

§Getting Started

use kwp::{Parser, Prefixes};
use std::env;

fn main() {
    let input = "+foo,-bar,+baz,-bak";

    let parser = Parser::new(
        &input,
        Prefixes::default()
    );

    let resp = parser.parse();
    println!("{:#?}", resp);
}

Structs§

  • Represents the main parser
  • Represents the positive and negative keyword prefixes for parsing.

Type Aliases§

  • Shorthand for parsed data from the parse function.
  • The response type from the parse function - basically a 3-tuple of Vec<String>.