/// Consume the next directory request, verifying it is intended to read the blob identified
/// by `merkle`.  Returns a `MockBlob` representing the open blob file.
///
/// # Panics
///
/// Panics on error or assertion violation (unexpected requests or a mismatched open call)
Consume the next directory request, verifying it is intended to read the blob identified
by `merkle`.  Returns a `MockBlob` representing the open blob file.
Consume the next directory request verifying it is intended to read the blob identified by ` merkle ` . Returns a ` MockBlob ` representing the open blob file .
pub async fn expect_open_blob(&mut self, merkle: Hash) -> MockBlob {
        match self.stream.next().await {
            Some(Ok(DirectoryRequest::Open {
                flags: _,
                mode: _,
                path,
                object,
                control_handle: _,
            })) => {
                assert_eq!(path, merkle.to_string());
                let stream = object.into_stream().unwrap().cast_stream();
                MockBlob { stream }
            }
            other => panic!("unexpected request: {:?}", other),
        }
    }
pub async fn expect_open_blob ( & mut self , merkle : Hash ) -> MockBlob { match self . stream . next ( ) . await { Some ( Ok ( DirectoryRequest :: Open { flags : _ , mode : _ , path , object , control_handle : _ , } ) ) => { assert_eq ! ( path merkle to_string ( ) ) ; let stream = object . into_stream ( ) . unwrap ( ) . cast_stream ( ) ; MockBlob { stream } } other => panic ! ( " " other ) , } }
Consume the next directory request, verifying it is intended to read the blob identified
by `merkle`.
Consume the next directory request verifying it is intended to read the blob identified by ` merkle ` .
&mut self
merkle
Hash
panics
Panics on error or assertion violation (unexpected requests or a mismatched open call)
Panics on error or assertion violation ( unexpected requests or a mismatched open call )