bin_encode_decode/common/struct.rs
1/// Represents a struct for handling both encode and decode of strings
2/// using a custom character set (`charset`). This struct provides methods to
3/// encode and decode strings based on the provided `charset`.
4///
5/// # Fields
6/// - `charset`: A reference to the character set used for encoding and decoding.
7/// Each character in the `charset` should be unique and ideally contain exactly 64 characters
8/// for base64-like encoding.
9///
10/// # Lifetimes
11/// - `'a`: The lifetime `'a` is associated with `charset`, ensuring that the `charset` reference
12/// lives at least as long as the `Charset` instance.
13#[derive(Debug, Clone)]
14pub struct Charset<'a>(pub &'a str);