pub struct NodeWriter<W: WriteBlock> { /* private fields */ }Expand description
Write a node (file or directory) to the block storage.
Implementations§
Source§impl<W: WriteBlock> NodeWriter<W>
impl<W: WriteBlock> NodeWriter<W>
pub fn new( service_id: ServiceId, writer: W, file_size: u64, block_size: usize, ) -> Result<Self, Error>
pub fn new_dir( service_id: ServiceId, writer: W, file_size: u64, block_size: usize, ) -> Result<Self, Error>
pub fn write_all(&mut self, data: &[u8]) -> Result<(), Error>
pub fn read_from<R: HostFileRead>( &mut self, reader: &mut R, ) -> Result<(), Error>
Auto Trait Implementations§
impl<W> Freeze for NodeWriter<W>where
W: Freeze,
impl<W> RefUnwindSafe for NodeWriter<W>where
W: RefUnwindSafe,
impl<W> Send for NodeWriter<W>where
W: Send,
impl<W> Sync for NodeWriter<W>where
W: Sync,
impl<W> Unpin for NodeWriter<W>where
W: Unpin,
impl<W> UnwindSafe for NodeWriter<W>where
W: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more