pub struct DurationDto {
pub secs: u64,
pub nanos: u32,
}Expand description
Stronghold-compatible duration (ignored for OS keyring persistence).
§Example
use tauri_plugin_keyring_store::DurationDto;
use std::time::Duration;
let d = DurationDto { secs: 1, nanos: 500 };
let std_d: Duration = d.into();
assert_eq!(std_d.as_secs(), 1);Fields§
§secs: u64Whole seconds.
nanos: u32Sub-second nanoseconds (0..1_000_000_000).
Trait Implementations§
Source§impl Clone for DurationDto
impl Clone for DurationDto
Source§fn clone(&self) -> DurationDto
fn clone(&self) -> DurationDto
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DurationDto
impl Debug for DurationDto
Source§impl<'de> Deserialize<'de> for DurationDto
impl<'de> Deserialize<'de> for DurationDto
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<DurationDto> for Duration
impl From<DurationDto> for Duration
Source§fn from(d: DurationDto) -> Self
fn from(d: DurationDto) -> Self
Converts to this type from the input type.
Source§impl Serialize for DurationDto
impl Serialize for DurationDto
impl Copy for DurationDto
Auto Trait Implementations§
impl Freeze for DurationDto
impl RefUnwindSafe for DurationDto
impl Send for DurationDto
impl Sync for DurationDto
impl Unpin for DurationDto
impl UnsafeUnpin for DurationDto
impl UnwindSafe for DurationDto
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