diff options
| author | Igor Tolmachev <me@igorek.dev> | 2024-07-21 16:59:14 +0900 |
|---|---|---|
| committer | Igor Tolmachev <me@igorek.dev> | 2024-07-21 16:59:14 +0900 |
| commit | 4c411b76cad9cc735687dc739d2e2db5d00e5eac (patch) | |
| tree | 818168ca5726ad3f9d24089dba31a24ff6b1b1f4 /src/utils/cursor.rs | |
| parent | 7bcdc3b4ca460aec2b98fb2dca6165788c562b05 (diff) | |
| download | archivator-4c411b76cad9cc735687dc739d2e2db5d00e5eac.tar.gz archivator-4c411b76cad9cc735687dc739d2e2db5d00e5eac.zip | |
Add AES encryption
Diffstat (limited to 'src/utils/cursor.rs')
| -rw-r--r-- | src/utils/cursor.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/utils/cursor.rs b/src/utils/cursor.rs index 91d44f8..ee80474 100644 --- a/src/utils/cursor.rs +++ b/src/utils/cursor.rs | |||
| @@ -7,13 +7,12 @@ pub struct IoCursor<Io> { | |||
| 7 | } | 7 | } |
| 8 | 8 | ||
| 9 | impl<Io: Seek> IoCursor<Io> { | 9 | impl<Io: Seek> IoCursor<Io> { |
| 10 | pub fn new(mut io: Io, start: u64, end: u64) -> Result<Self> { | 10 | pub fn new(io: Io, cursor: u64, end: u64) -> Self { |
| 11 | let cursor = io.seek(SeekFrom::Start(start))?; | 11 | Self { |
| 12 | Ok(Self { | ||
| 13 | io, | 12 | io, |
| 14 | cursor, | 13 | cursor, |
| 15 | bounds: (cursor, end), | 14 | bounds: (cursor, end), |
| 16 | }) | 15 | } |
| 17 | } | 16 | } |
| 18 | } | 17 | } |
| 19 | 18 | ||
