Struct safe_app::nfs::Reader [−][src]
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]
impl<C> Reader<C> where
C: Client,
ⓘImportant traits for Box<R>pub fn new(
client: C,
storage: SelfEncryptionStorage<C>,
file: &File,
encryption_key: Option<Key>
) -> Box<Future<Item = Reader<C>, Error = NfsError> + 'static>
[src]
ⓘImportant traits for Box<R>
pub fn new(
client: C,
storage: SelfEncryptionStorage<C>,
file: &File,
encryption_key: Option<Key>
) -> Box<Future<Item = Reader<C>, Error = NfsError> + 'static>
Create a new instance of Reader.
pub fn size(&self) -> u64
[src]
pub fn size(&self) -> u64
Returns the total size of the file/blob.
ⓘImportant traits for Box<R>pub fn read(
&self,
position: u64,
length: u64
) -> Box<Future<Item = Vec<u8>, Error = NfsError> + 'static>
[src]
ⓘImportant traits for Box<R>
pub fn read(
&self,
position: u64,
length: u64
) -> Box<Future<Item = Vec<u8>, Error = NfsError> + 'static>
Read data from file/blob.