[][src]Struct safe_app::nfs::Writer

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

Writer is used to write contents to a File and especially in chunks if the file happens to be too large.

Methods

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

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

Create new instance of Writer.

pub fn write(
    &self,
    data: &[u8]
) -> Box<dyn Future<Error = NfsError, Item = ()> + 'static>
[src]

Data of a file/blob can be written in smaller chunks.

pub fn close(self) -> Box<dyn Future<Error = NfsError, Item = File> + 'static>[src]

close() should be invoked only after all the data is completely written. The file/blob is saved only when close() is invoked. Returns the final File with the data_map stored on the network.

Auto Trait Implementations

impl<C> !RefUnwindSafe for Writer<C>

impl<C> !Send for Writer<C>

impl<C> !Sync for Writer<C>

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

impl<C> !UnwindSafe for Writer<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>,