feat(tvix/castore/blobsvc): BlobReader for more trivial types
Change-Id: I80e4f26c41a504fa4c6a013c2a1e76de613ba294 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11078 Reviewed-by: Connor Brewster <cbrewster@hey.com> Tested-by: BuildkiteCI
This commit is contained in:
parent
982459d343
commit
53fb9ff4c6
1 changed files with 2 additions and 0 deletions
|
@ -77,5 +77,7 @@ pub trait BlobWriter: tokio::io::AsyncWrite + Send + Unpin {
|
|||
pub trait BlobReader: tokio::io::AsyncRead + tokio::io::AsyncSeek + Send + Unpin + 'static {}
|
||||
|
||||
/// A [`io::Cursor<Vec<u8>>`] can be used as a BlobReader.
|
||||
impl BlobReader for io::Cursor<&'static [u8]> {}
|
||||
impl BlobReader for io::Cursor<&'static [u8; 0]> {}
|
||||
impl BlobReader for io::Cursor<Vec<u8>> {}
|
||||
impl BlobReader for tokio::fs::File {}
|
||||
|
|
Loading…
Reference in a new issue