aboutsummaryrefslogtreecommitdiff
path: root/src/io.rs
diff options
context:
space:
mode:
authorIgor Tolmachov <me@igorek.dev>2023-08-17 15:34:47 +0900
committerIgor Tolmachev <me@igorek.dev>2024-06-23 15:34:32 +0900
commitd8be93a740e8cc8103c4f9e260a62244eba1a6a4 (patch)
treeacc3b3b7f86fa3e2e4e8656d554efa62a24aa3f7 /src/io.rs
parent22dad8c7431d0ca94acc51d161e7f4ad5a4b1f5d (diff)
downloadarchivator-d8be93a740e8cc8103c4f9e260a62244eba1a6a4.tar.gz
archivator-d8be93a740e8cc8103c4f9e260a62244eba1a6a4.zip
Add basic lib architecture
Diffstat (limited to 'src/io.rs')
-rw-r--r--src/io.rs21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/io.rs b/src/io.rs
new file mode 100644
index 0000000..cea998f
--- /dev/null
+++ b/src/io.rs
@@ -0,0 +1,21 @@
1use std::io::{Read, Seek, Write};
2
3use crate::result::ArchiveResult;
4
5pub trait ArchiveRead
6where
7 Self: Sized,
8{
9 type Reader: Read + Seek;
10
11 fn new(reader: Self::Reader) -> ArchiveResult<Self>;
12}
13
14pub trait ArchiveWrite
15where
16 Self: Sized,
17{
18 type Writer: Write;
19
20 fn new(write: Self::Writer) -> ArchiveResult<Self>;
21}