pub struct FsUtils;Expand description
A convenience struct to access utilities
Implementations§
Source§impl FsUtils
impl FsUtils
Sourcepub fn maybe_time(time_result: Option<SystemTime>) -> Option<Tai64N>
pub fn maybe_time(time_result: Option<SystemTime>) -> Option<Tai64N>
Returns Option::None if time query is not supported
Sourcepub fn size_to_bytes(bytes: usize) -> String
pub fn size_to_bytes(bytes: usize) -> String
Calculate the size in bytes
Sourcepub fn tai64_to_local_hrs<'a>(time: &Tai64N) -> DateTimeString<'a>
pub fn tai64_to_local_hrs<'a>(time: &Tai64N) -> DateTimeString<'a>
Convert TAI64N to local time in 24 hour format
Sourcepub fn tai64_to_local_am_pm<'a>(time: &Tai64N) -> DateTimeString<'a>
pub fn tai64_to_local_am_pm<'a>(time: &Tai64N) -> DateTimeString<'a>
Convert TAI64N to local time in 12 hour format
Sourcepub fn tai64_to_humantime_with_epoch(time: &Tai64N) -> Option<String>
pub fn tai64_to_humantime_with_epoch(time: &Tai64N) -> Option<String>
Convert duration since UNIX EPOCH to humantime
Sourcepub fn tai64_to_humantime(
earlier_time: &Tai64N,
current_time: &Tai64N,
) -> Option<String>
pub fn tai64_to_humantime( earlier_time: &Tai64N, current_time: &Tai64N, ) -> Option<String>
Convert duration since two TAI64N timestamps to humantime
Sourcepub fn tai64_now_duration_to_humantime(earlier_time: &Tai64N) -> Option<String>
pub fn tai64_now_duration_to_humantime(earlier_time: &Tai64N) -> Option<String>
Convert duration between current time and earlier TAI64N timestamp to humantime
Sourcepub fn tai64_duration(
earlier_time: &Tai64N,
current_time: &Tai64N,
) -> Option<Duration>
pub fn tai64_duration( earlier_time: &Tai64N, current_time: &Tai64N, ) -> Option<Duration>
Get the duration between two TAI64N timestamps
Sourcepub fn tai64_duration_since_epoch(time: &Tai64N) -> Option<Duration>
pub fn tai64_duration_since_epoch(time: &Tai64N) -> Option<Duration>
Get the duration since UNIX EPOCH
Sourcepub fn tai64_duration_from_now(earlier_time: &Tai64N) -> Option<Duration>
pub fn tai64_duration_from_now(earlier_time: &Tai64N) -> Option<Duration>
Get the duration since UNIX EPOCH
Auto Trait Implementations§
impl Freeze for FsUtils
impl RefUnwindSafe for FsUtils
impl Send for FsUtils
impl Sync for FsUtils
impl Unpin for FsUtils
impl UnwindSafe for FsUtils
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