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::{
66
77use n0_future:: StreamExt ;
88
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 ,
1215} ;
1316
1417/// A reader for blobs that implements `AsyncRead` and `AsyncSeek`.
@@ -37,13 +40,17 @@ enum ReaderState {
3740}
3841
3942impl BlobReader {
40- pub fn new ( blobs : Blobs , options : ReaderOptions ) -> Self {
43+ pub ( super ) fn new ( blobs : Blobs , options : ReaderOptions ) -> Self {
4144 Self {
4245 blobs,
4346 options,
4447 state : ReaderState :: Idle { position : 0 } ,
4548 }
4649 }
50+
51+ pub fn hash ( & self ) -> & Hash {
52+ & self . options . hash
53+ }
4754}
4855
4956impl tokio:: io:: AsyncRead for BlobReader {
You can’t perform that action at this time.
0 commit comments