ptero/
method.rs

1use crate::{context::Context, decoder::Decoder, encoder::Encoder};
2
3/// Method which adds extra ASCII space when encoding bit
4pub mod random_whitespace;
5
6/// Method  which puts trailing ASCII space when encoding bit
7pub mod trailing_whitespace;
8
9/// Method which adds extra word when encoding bit (uses pivot, which informs about expected max line length)
10pub mod line_extend;
11
12/// Method which puts trailing Unicode whitespace or invisible chars when encoding bit
13pub mod trailing_unicode;
14
15/// Module containing complex methods. Complex usually means combination of several other methods.
16pub mod complex;
17
18pub mod variant;
19
20/// Combination of [Encoder](crate::encoder::Encoder) and [Decoder](crate::decoder::Decoder) traits - each method should be able to encode and decode.
21pub trait Method<E, D>: Encoder<E> + Decoder<D>
22where
23    E: Context,
24    D: Context,
25{
26    fn method_name(&self) -> String;
27}