Struct shared_files::SharedTemporaryFile
source · pub struct SharedTemporaryFile { /* private fields */ }
Expand description
A temporary file with shared read/write access.
Implementations§
sourcepub async fn new() -> Result<SharedTemporaryFile, Error>
pub async fn new() -> Result<SharedTemporaryFile, Error>
Creates a new temporary file.
sourcepub async fn writer(&self) -> Result<SharedTemporaryFileWriter, Error>
pub async fn writer(&self) -> Result<SharedTemporaryFileWriter, Error>
Creates a writer for the file.
Note that this operation can result in odd behavior if the file is accessed multiple times for write access. User code must make sure that only one meaningful write is performed at the same time.
sourcepub async fn reader(&self) -> Result<SharedTemporaryFileReader, Error>
pub async fn reader(&self) -> Result<SharedTemporaryFileReader, Error>
Creates a reader for the file.