Struct FileTimes
#[must_use = "must be applied to a file via `File::set_times` to have any effect"]
pub struct FileTimes(pub(in ::fs) FileTimes);
Representation of the various timestamps on a file.
Fields
0: FileTimes
Implementations
impl FileTimes
fn new() -> SelfCreates a new
FileTimeswith no times set.Using the resulting
FileTimesinFile::set_timeswill not modify any timestamps.fn set_accessed(self, t: SystemTime) -> SelfSet the last access time of a file.
fn set_modified(self, t: SystemTime) -> SelfSet the last modified time of a file.
Trait Implementations
impl AsInnerMut<FileTimes> for FileTimes
fn as_inner_mut(&mut self) -> &mut FileTimes
impl Clone for FileTimes
fn clone(&self) -> FileTimes
impl Copy for FileTimes
impl Debug for FileTimes
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Default for FileTimes
fn default() -> FileTimes
impl FileTimesExt for FileTimes
fn set_created(self, t: SystemTime) -> Self
impl FileTimesExt for FileTimes
fn set_created(self, t: SystemTime) -> Self
impl TrivialClone for FileTimes
Auto Trait Implementations
impl Freeze for FileTimes
impl RefUnwindSafe for FileTimes
impl Send for FileTimes
impl Sync for FileTimes
impl Unpin for FileTimes
impl UnsafeUnpin for FileTimes
impl UnwindSafe for FileTimes
Blanket Implementations
impl<T> Any for FileTimes
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for FileTimes
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for FileTimes
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for FileTimes
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for FileTimes
fn from(t: T) -> TReturns the argument unchanged.
impl<T> Printable for FileTimes
where
T: Copy + Debug,
impl<T> SizeHint for FileTimes
where
T: ?Sized,
fn lower_bound(&self) -> usizefn upper_bound(&self) -> Option<usize>
impl<T> SizedTypeProperties for FileTimes
impl<T> ToOwned for FileTimes
where
T: Clone,
type Owned = T;fn to_owned(&self) -> Tfn clone_into(&self, target: &mut T)
impl<T, U> Into<U> for FileTimes
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for FileTimes
where
U: Into<T>,
type Error = Infallible;fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto<U> for FileTimes
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>