[go: up one dir, main page]

[][src]Struct cacache::get::AsyncGet

pub struct AsyncGet { /* fields omitted */ }

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

impl AsyncRead for AsyncGet[src]

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]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ReadExt for T where
    T: AsyncRead + ?Sized
[src]

impl<R> AsyncReadExt for R where
    R: AsyncRead + ?Sized
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,