[][src]Struct safe_core::nfs::Reader

pub struct Reader<C: Client + 'static> { /* fields omitted */ }

Reader is used to read contents of a File. It can read in chunks if the File happens to be very large.

Implementations

impl<C: Client + 'static> Reader<C>[src]

pub async fn new<'_>(
    client: C,
    storage: SelfEncryptionStorage<C>,
    file: &'_ File,
    encryption_key: Option<Key>
) -> Result<Self, NfsError>
[src]

Create a new instance of Reader.

pub async fn size<'_>(&'_ self) -> u64[src]

Returns the total size of the file/blob.

pub async fn read<'_>(
    &'_ self,
    position: u64,
    length: u64
) -> Result<Vec<u8>, NfsError>
[src]

Read data from file/blob.

Auto Trait Implementations

impl<C> !RefUnwindSafe for Reader<C>

impl<C> Send for Reader<C>

impl<C> Sync for Reader<C>

impl<C> Unpin for Reader<C> where
    C: Unpin

impl<C> !UnwindSafe for Reader<C>

Blanket Implementations

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

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

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

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self

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> UnsafeAny for T where
    T: Any

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