Skip to main content

TempFile

Trait TempFile 

Source
pub trait TempFile: Debug {
    // Required method
    fn path(&self) -> &Path;
}
Expand description

A type used to represent a temporary file. The assumption is that the implementer may want to make the type Drop so that the temporary file is cleaned up if it isn’t consumed.

Required Methods§

Source

fn path(&self) -> &Path

Return the path to the temporary file. Can be used to open the file to write into it.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl TempFile for maelstrom_util::cache::fs::std::TempFile

Source§

impl TempFile for maelstrom_util::cache::fs::test::TempFile