[−][src]Struct cacache::get::AsyncGet
File handle for asynchronously reading from a content entry.
Make sure to call .check() when done reading to verify that the
extracted data passes integrity verification.
Methods
impl AsyncGet[src]
pub fn check(self) -> Result<Algorithm, Error>[src]
Checks that data read from disk passes integrity checks. Returns the algorithm that was used verified the data. Should be called only after all data has been read from disk.
Example
let mut handle = cacache::get::open("./my-cache", "my-key").await?; let mut str = String::new(); handle.read_to_string(&mut str).await?; // Remember to check that the data you got was correct! handle.check()?;
Trait Implementations
Auto Trait Implementations
impl Send for AsyncGet
impl Sync for AsyncGet
impl Unpin for AsyncGet
impl !UnwindSafe for AsyncGet
impl !RefUnwindSafe for AsyncGet
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> From<T> for T[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ReadExt for T where
T: AsyncRead + ?Sized, [src]
T: AsyncRead + ?Sized,
fn read(&'a mut self, buf: &'a mut [u8]) -> ReadFuture<'a, Self> where
Self: Unpin, [src]
Self: Unpin,
fn read_vectored(
&'a mut self,
bufs: &'a mut [IoSliceMut<'a>]
) -> ReadVectoredFuture<'a, Self> where
Self: Unpin, [src]
&'a mut self,
bufs: &'a mut [IoSliceMut<'a>]
) -> ReadVectoredFuture<'a, Self> where
Self: Unpin,
fn read_to_end(&'a mut self, buf: &'a mut Vec<u8>) -> ReadToEndFuture<'a, Self> where
Self: Unpin, [src]
Self: Unpin,
fn read_to_string(
&'a mut self,
buf: &'a mut String
) -> ReadToStringFuture<'a, Self> where
Self: Unpin, [src]
&'a mut self,
buf: &'a mut String
) -> ReadToStringFuture<'a, Self> where
Self: Unpin,
fn read_exact(&'a mut self, buf: &'a mut [u8]) -> ReadExactFuture<'a, Self> where
Self: Unpin, [src]
Self: Unpin,
fn take(self, limit: u64) -> Take<Self>[src]
fn by_ref(&mut self) -> &mut Self[src]
fn bytes(self) -> Bytes<Self>[src]
fn chain<R>(self, next: R) -> Chain<Self, R> where
R: AsyncRead, [src]
R: AsyncRead,
impl<R> AsyncReadExt for R where
R: AsyncRead + ?Sized, [src]
R: AsyncRead + ?Sized,
fn chain<R>(self, next: R) -> Chain<Self, R> where
R: AsyncRead, [src]
R: AsyncRead,
fn copy_into<W>(self, writer: &mut W) -> CopyInto<Self, W> where
W: AsyncWrite + Unpin + ?Sized, [src]
W: AsyncWrite + Unpin + ?Sized,
fn read(&'a mut self, buf: &'a mut [u8]) -> Read<'a, Self> where
Self: Unpin, [src]
Self: Unpin,
fn read_vectored(
&'a mut self,
bufs: &'a mut [IoSliceMut<'a>]
) -> ReadVectored<'a, Self> where
Self: Unpin, [src]
&'a mut self,
bufs: &'a mut [IoSliceMut<'a>]
) -> ReadVectored<'a, Self> where
Self: Unpin,
fn read_exact(&'a mut self, buf: &'a mut [u8]) -> ReadExact<'a, Self> where
Self: Unpin, [src]
Self: Unpin,
fn read_to_end(&'a mut self, buf: &'a mut Vec<u8>) -> ReadToEnd<'a, Self> where
Self: Unpin, [src]
Self: Unpin,
fn read_to_string(&'a mut self, buf: &'a mut String) -> ReadToString<'a, Self> where
Self: Unpin, [src]
Self: Unpin,
fn split(self) -> (ReadHalf<Self>, WriteHalf<Self>) where
Self: AsyncWrite, [src]
Self: AsyncWrite,
fn take(self, limit: u64) -> Take<Self>[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,