File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -6,9 +6,12 @@ use std::{
6
6
7
7
use n0_future:: StreamExt ;
8
8
9
- use crate :: api:: {
10
- blobs:: { Blobs , ReaderOptions } ,
11
- proto:: ExportRangesItem ,
9
+ use crate :: {
10
+ api:: {
11
+ blobs:: { Blobs , ReaderOptions } ,
12
+ proto:: ExportRangesItem ,
13
+ } ,
14
+ Hash ,
12
15
} ;
13
16
14
17
/// A reader for blobs that implements `AsyncRead` and `AsyncSeek`.
@@ -37,13 +40,17 @@ enum ReaderState {
37
40
}
38
41
39
42
impl BlobReader {
40
- pub fn new ( blobs : Blobs , options : ReaderOptions ) -> Self {
43
+ pub ( super ) fn new ( blobs : Blobs , options : ReaderOptions ) -> Self {
41
44
Self {
42
45
blobs,
43
46
options,
44
47
state : ReaderState :: Idle { position : 0 } ,
45
48
}
46
49
}
50
+
51
+ pub fn hash ( & self ) -> & Hash {
52
+ & self . options . hash
53
+ }
47
54
}
48
55
49
56
impl tokio:: io:: AsyncRead for BlobReader {
You can’t perform that action at this time.
0 commit comments