Skip to content

Commit 645e0fd

Browse files
committed
feat: v1.1.41
1 parent 8e0db1d commit 645e0fd

File tree

3 files changed

+31
-29
lines changed

3 files changed

+31
-29
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "bin-encode-decode"
3-
version = "1.1.40"
3+
version = "1.1.41"
44
readme = "README.md"
55
edition = "2024"
66
authors = ["root@ltpp.vip"]

src/common/enum.rs

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
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+
}

src/common/struct.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,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(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+
);

0 commit comments

Comments
 (0)