ircmsgprs

Crates.ioircmsgprs
lib.rsircmsgprs
version0.2.1
sourcesrc
created_at2020-02-07 02:49:29.296721
updated_at2020-02-13 10:46:52.210405
descriptionA simple library for parsing IRC protocol messages.
homepagehttps://github.com/diath/ircmsgprs
repositoryhttps://github.com/diath/ircmsgprs
max_upload_size
id205662
size9,797
(diath)

documentation

README

ircmsgprs

A simple Rust library that parses IRC protocol messages and turns them into the following struct:

#[derive(Default, Debug)]
pub struct Message {
    pub server: Option<String>,
    pub nick: Option<String>,
    pub user: Option<String>,
    pub host: Option<String>,
    pub command: String,
    pub params: Vec<String>,
}

Usage

let mut parser = parser::Parser::new();
let result = parser
    .parse(":nick!user@host COMMAND param1 param2 :trailing param with spaces")
    .unwrap();
println!("{}", result);

License

Licensed under the MIT license. See the license file for details.

Commit count: 23

cargo fmt