[go: up one dir, main page]

[][src]Struct cacache::get::SyncGet

pub struct SyncGet { /* fields omitted */ }

File handle for reading from a content entry.

Make sure to call get.check() when done reading to verify that the extracted data passes integrity verification.

Methods

impl SyncGet[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_sync("./my-cache", "my-key")?;
let mut str = String::new();
handle.read_to_string(&mut str)?;
// Remember to check that the data you got was correct!
handle.check()?;

Trait Implementations

impl Read for SyncGet[src]

Auto Trait Implementations

impl Send for SyncGet

impl Sync for SyncGet

impl Unpin for SyncGet

impl UnwindSafe for SyncGet

impl RefUnwindSafe for SyncGet

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<R> ReadBytesExt for R where
    R: Read + ?Sized

impl<T> Same<T> for T

type Output = T

Should always be Self

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