[][src]Struct safe_app::nfs::Reader

pub struct Reader<C> where
    C: Client
{ /* fields omitted */ }

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

Methods

impl<C> Reader<C> where
    C: Client
[src]

pub fn new(
    client: C,
    storage: SelfEncryptionStorage<C>,
    file: &File,
    encryption_key: Option<Key>
) -> Box<dyn Future<Error = NfsError, Item = Reader<C>> + 'static>
[src]

Create a new instance of Reader.

pub fn size(&self) -> u64[src]

Returns the total size of the file/blob.

pub fn read(
    &self,
    position: u64,
    length: u64
) -> Box<dyn Future<Error = NfsError, Item = Vec<u8>> + 'static>
[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>,