pub struct DurationBuilder { /* private fields */ }Implementations§
Source§impl DurationBuilder
impl DurationBuilder
Sourcepub const fn seconds(self, seconds: f64) -> Self
pub const fn seconds(self, seconds: f64) -> Self
Sets the seconds component.
§Examples
use typwire::Duration;
let d = Duration::builder().seconds(30.0).build();
assert_eq!(d.seconds(), 30.0);Sourcepub const fn minutes(self, minutes: f64) -> Self
pub const fn minutes(self, minutes: f64) -> Self
Sets the minutes component.
§Examples
use typwire::Duration;
let d = Duration::builder().minutes(2.0).build();
assert_eq!(d.minutes(), 2.0);Sourcepub const fn hours(self, hours: f64) -> Self
pub const fn hours(self, hours: f64) -> Self
Sets the hours component.
§Examples
use typwire::Duration;
let d = Duration::builder().hours(1.0).build();
assert_eq!(d.hours(), 1.0);Sourcepub const fn days(self, days: f64) -> Self
pub const fn days(self, days: f64) -> Self
Sets the days component.
§Examples
use typwire::Duration;
let d = Duration::builder().days(1.0).build();
assert_eq!(d.days(), 1.0);