[−][src]Struct safe_app::nfs::Writer
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]
C: Client,
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]
client: &C,
storage: SelfEncryptionStorage<C>,
file: File,
mode: Mode,
encryption_key: Option<Key>
) -> Box<dyn Future<Error = NfsError, Item = Writer<C>> + 'static>
Create new instance of Writer.
pub fn write(
&self,
data: &[u8]
) -> Box<dyn Future<Error = NfsError, Item = ()> + 'static>
[src]
&self,
data: &[u8]
) -> Box<dyn Future<Error = NfsError, Item = ()> + 'static>
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,
C: Unpin,
impl<C> !UnwindSafe for Writer<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>,