nettext 0.4.1

A text-based data format for cryptographic network protocols
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use err_derive::Error;

/// An error that happenned when creating a nettext encoder term
#[derive(Debug, Error)]
pub enum Error {
    #[error(display = "Invalid character '{}'", _0)]
    InvalidCharacter(u8),
    #[error(display = "Invalid RAW nettext litteral")]
    InvalidRaw,
    #[error(display = "Tried to insert into a term that isn't a dictionnary")]
    NotADictionnary,
    #[error(display = "Duplicate key: {}", _0)]
    DuplicateKey(String),
    #[error(
        display = "Refusing to build nested sequencess with seq(), use either seq_flatten() or seq_nested()"
    )]
    SeqInSeq,
}