pub struct TempFilePath { /* private fields */ }Available on crate feature
std only.Implementations§
Source§impl TempFilePath
impl TempFilePath
pub fn new<T: AsRef<Path>>(path: T) -> Self
Sourcepub fn new_tempfile() -> Result<Self, Error>
pub fn new_tempfile() -> Result<Self, Error>
Creates a new temporary file with the default prefix of .tmpirxf_
that will be deleted when this object is dropped.
Sourcepub fn new_tempfile_prefixed(prefix: &str) -> Result<Self, Error>
pub fn new_tempfile_prefixed(prefix: &str) -> Result<Self, Error>
Creates a new temporary file with the provided prefix that will be deleted when this object is dropped.
pub fn open(&self, opts: &OpenOptions) -> Result<File, Error>
pub fn open_write_buffered( &self, opts: &OpenOptions, ) -> Result<BufWriter<File>, Error>
pub fn open_read_buffered( &self, opts: &OpenOptions, ) -> Result<BufReader<File>, Error>
Trait Implementations§
Source§impl Debug for TempFilePath
impl Debug for TempFilePath
Source§impl Drop for TempFilePath
impl Drop for TempFilePath
Source§impl From<&PathBuf> for TempFilePath
impl From<&PathBuf> for TempFilePath
Auto Trait Implementations§
impl Freeze for TempFilePath
impl RefUnwindSafe for TempFilePath
impl Send for TempFilePath
impl Sync for TempFilePath
impl Unpin for TempFilePath
impl UnwindSafe for TempFilePath
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