Add new fn Download::with_data_verifier

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
Jiahao XU 2024-06-05 00:16:58 +10:00
parent 3cee8a927b
commit c19fcb697a
No known key found for this signature in database
GPG key ID: 76D1E687CA3C4928

View file

@ -154,6 +154,13 @@ impl<'a> Download<'a> {
} }
} }
pub fn with_data_verifier<'d>(self, data_verifier: &'d mut dyn DataVerifier) -> Download<'d> {
Download {
content: self.content,
data_verifier: Some(data_verifier),
}
}
async fn get_stream( async fn get_stream(
self, self,
) -> Result< ) -> Result<