Oregami
Repositories/oxedyne/fe2o3

oxedyne/fe2o3/fe2o3_iop_hash/src/csum.rs

800 bytes, 5 runs

created by r1870400018:415, which is this file's identity for as long as the history lasts, whatever it is later renamed to

download · who wrote it · its history

1use oxedyne_fe2o3_core::prelude::*;
2use oxedyne_fe2o3_namex::id::InNamex;
3
4pub trait Checksummer:
5 Clone
6 + std::fmt::Debug
7 + InNamex
8 + Send
9 + Sync
10{
11 fn len(&self) -> Outcome<usize>;
12 fn calculate(self, buf: &[u8]) -> Outcome<Vec<u8>>;
13 fn update(&mut self, buf: &[u8]) -> Outcome<()>;
14 fn finalize(self) -> Outcome<Vec<u8>>;
15 fn copy(&self, buf: &[u8]) -> Outcome<Vec<u8>>;
16 fn append(self, buf: Vec<u8>) -> Outcome<(Vec<u8>, Vec<u8>)>;
17 fn verify(self, buf: &[u8]) -> Outcome<Vec<u8>>;
18 fn read_bytes<R: std::io::Read>(&self, r: &mut R) -> Outcome<(Vec<u8>, usize)>;
19}
20