irctokens-rs/src/obj.rs

20 lines
413 B
Rust
Raw Normal View History

2023-03-22 22:14:17 +00:00
use std::collections::BTreeMap;
pub struct Line {
// tags are promised to be utf8 encoded
pub tags: Option<BTreeMap<String, Option<String>>>,
pub source: Option<Vec<u8>>,
// commands are promised to be ascii encoded
pub command: String,
pub args: Vec<Vec<u8>>,
}
#[derive(Debug)]
pub enum Error {
Empty,
MissingCommand,
CommandDecode,
TagKeyDecode,
TagValueDecode,
}