mail_parser/decoders/mod.rs
1/*
2 * SPDX-FileCopyrightText: 2020 Stalwart Labs LLC <hello@stalw.art>
3 *
4 * SPDX-License-Identifier: Apache-2.0 OR MIT
5 */
6
7use std::borrow::Cow;
8
9use crate::parsers::MessageStream;
10
11pub mod base64;
12pub mod charsets;
13pub mod encoded_word;
14pub mod hex;
15pub mod html;
16pub mod quoted_printable;
17
18pub type DecodeFnc<'x> = fn(&mut MessageStream<'x>, &[u8]) -> (usize, Cow<'x, [u8]>);
19pub type DecodeWordFnc<'x> = fn(&mut MessageStream<'x>) -> Option<Vec<u8>>;