Struct safe_core::nfs::Writer
[−]
[src]
pub struct Writer<T> { /* 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<T: 'static> Writer<T>
[src]
fn new(
client: Client<T>,
storage: SelfEncryptionStorage<T>,
file: File,
mode: Mode,
encryption_key: Option<Key>
) -> Box<NfsFuture<Writer<T>>>
[src]
client: Client<T>,
storage: SelfEncryptionStorage<T>,
file: File,
mode: Mode,
encryption_key: Option<Key>
) -> Box<NfsFuture<Writer<T>>>
Create new instance of Writer
fn write(&self, data: &[u8]) -> Box<NfsFuture<()>>
[src]
Data of a file/blob can be written in smaller chunks
fn close(self) -> Box<NfsFuture<File>>
[src]
close is invoked only after all the data is completely written. The
file/blob is saved only when the close is invoked. Returns the final
File
with the data_map stored on the network.