File tree Expand file tree Collapse file tree 3 files changed +31
-29
lines changed
Expand file tree Collapse file tree 3 files changed +31
-29
lines changed Original file line number Diff line number Diff line change 11[package ]
22name = " bin-encode-decode"
3- version = " 1.1.40 "
3+ version = " 1.1.41 "
44readme = " README.md"
55edition = " 2024"
66authors = [" root@ltpp.vip" ]
Original file line number Diff line number Diff line change 1- /// Represents errors that can occur during encoding.
2- ///
3- /// These errors are related to character set validation and encoding process.
4- #[ derive( Debug , Clone ) ]
5- pub enum EncodeError {
6- /// Indicates invalid character set configuration.
7- CharsetError ,
8- }
9-
10- /// Represents errors that can occur during decoding.
11- ///
12- /// These errors are related to character set validation and decoding process.
13- #[ derive( Debug , Clone ) ]
14- pub enum DecodeError {
15- /// Indicates invalid character set configuration.
16- CharsetError ,
17- }
1+ /// Represents errors that can occur during encoding.
2+ ///
3+ /// These errors are related to character set validation and encoding process.
4+ #[ derive( Clone , Copy , Debug , Default ) ]
5+ pub enum EncodeError {
6+ /// Indicates invalid character set configuration.
7+ #[ default]
8+ CharsetError ,
9+ }
10+
11+ /// Represents errors that can occur during decoding.
12+ ///
13+ /// These errors are related to character set validation and decoding process.
14+ #[ derive( Clone , Copy , Debug , Default ) ]
15+ pub enum DecodeError {
16+ /// Indicates invalid character set configuration.
17+ #[ default]
18+ CharsetError ,
19+ }
Original file line number Diff line number Diff line change 1- /// Handles string encoding and decoding operations.
2- ///
3- /// Uses a custom character set for the encoding/decoding process.
4- ///
5- /// The character set should contain unique characters and ideally have 64 characters
6- /// for base64-like encoding.
7- #[ derive( Debug , Clone ) ]
8- pub struct Charset < ' a > (
9- /// Reference to the character set used for encoding/decoding.
10- pub & ' a str ,
11- ) ;
1+ /// Handles string encoding and decoding operations.
2+ ///
3+ /// Uses a custom character set for the encoding/decoding process.
4+ ///
5+ /// The character set should contain unique characters and ideally have 64 characters
6+ /// for base64-like encoding.
7+ #[ derive( Clone , Copy , Debug ) ]
8+ pub struct Charset < ' a > (
9+ /// Reference to the character set used for encoding/decoding.
10+ pub & ' a str ,
11+ ) ;
You can’t perform that action at this time.
0 commit comments