blob: dba8d06a758b5b3be3f1e849d680178b765b5539 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
use crate::file::{ArchiveFile, ArchiveFileRead, ArchiveFileWrite};
use std::io::{Read, Write};
pub struct FileInfo {}
pub struct FileReader {}
pub struct FileWriter {}
impl ArchiveFile for FileReader {
type Info = FileInfo;
fn info() -> Self::Info {
Self::Info {}
}
}
impl Read for FileReader {
fn read(&mut self, buf: &mut [u8]) -> std::io::Result<usize> {
return Ok(0);
}
}
impl ArchiveFileRead for FileReader {}
impl ArchiveFile for FileWriter {
type Info = FileInfo;
fn info() -> Self::Info {
Self::Info {}
}
}
impl Write for FileWriter {
fn write(&mut self, buf: &[u8]) -> std::io::Result<usize> {
return Ok(0);
}
fn flush(&mut self) -> std::io::Result<()> {
Ok(())
}
}
impl ArchiveFileWrite for FileWriter {}
|