[−][src]Trait temp_file_name::TempFilePath
Get a temporary file path for an object
Required methods
fn temp_filename(&self, ext: &str) -> String
Get a suitable temporary filename for a hashable object; this filename should be based on the hash and consistent across multiple calls, so that later callers can use the function to reconstruct an already-created filename. Note that the output is a string, not a PathBuf, since we can guarantee that the filename will be valid unicode.
fn temp_file_path<P: AsRef<Path>>(
&self,
folder_name: Option<P>,
ext: &str
) -> PathBuf
&self,
folder_name: Option<P>,
ext: &str
) -> PathBuf
Generate a temporary filepath for an object, giving it the extension ext
. This should
join the result of temp_filename
to a consistent temporary directory which is guaranteed to be
either the result of std::env::temp_dir
or (if folder_name
is not None) a subdirectory called folder_name
.
Implementors
impl<T> TempFilePath for T where
T: HashToString,
[src]
T: HashToString,