Struct rgssad::tokio::writer::TokioWriter
source · pub struct TokioWriter<W> { /* private fields */ }
Expand description
The archive writer.
Implementations§
source§impl<W> TokioWriter<W>
impl<W> TokioWriter<W>
source§impl<W> TokioWriter<W>where
W: AsyncWrite + Unpin,
impl<W> TokioWriter<W>where
W: AsyncWrite + Unpin,
sourcepub async fn write_header(&mut self) -> Result<(), Error>
pub async fn write_header(&mut self) -> Result<(), Error>
Write the archive header.
If the header has already been written, this is a NOP.
sourcepub async fn write_file<R>(
&mut self,
file_name: &str,
file_size: u32,
file_data: R,
) -> Result<(), Error>where
R: AsyncRead + Unpin,
pub async fn write_file<R>(
&mut self,
file_name: &str,
file_size: u32,
file_data: R,
) -> Result<(), Error>where
R: AsyncRead + Unpin,
Write a file.
An file is composed of a name (path), size, and data. This function may be retried. To retry, call this function with the same arguments. Note that if anything other than an I/O error occurs, the written bytes are likely corrupted.
Trait Implementations§
Auto Trait Implementations§
impl<W> Freeze for TokioWriter<W>where
W: Freeze,
impl<W> RefUnwindSafe for TokioWriter<W>where
W: RefUnwindSafe,
impl<W> Send for TokioWriter<W>where
W: Send,
impl<W> Sync for TokioWriter<W>where
W: Sync,
impl<W> Unpin for TokioWriter<W>where
W: Unpin,
impl<W> UnwindSafe for TokioWriter<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