[−][src]Struct safe_app::nfs::Reader
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]
C: Client,
pub fn new(
client: C,
storage: SelfEncryptionStorage<C>,
file: &File,
encryption_key: Option<Key>
) -> Box<dyn Future<Error = NfsError, Item = Reader<C>> + 'static>
[src]
client: C,
storage: SelfEncryptionStorage<C>,
file: &File,
encryption_key: Option<Key>
) -> Box<dyn Future<Error = NfsError, Item = Reader<C>> + 'static>
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]
&self,
position: u64,
length: u64
) -> Box<dyn Future<Error = NfsError, Item = Vec<u8>> + 'static>
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,
C: Unpin,
impl<C> !UnwindSafe for Reader<C>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> UnsafeAny for T where
T: Any,
T: Any,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,