pub struct SwapSchedule {
pub amount: SwapAmount,
pub rollover: NaiveTime,
pub triple_weekday: Weekday,
pub skipped_weekdays: Vec<Weekday>,
}Expand description
Nightly swap magnitude plus the rollover calendar that charges it.
Fields§
§amount: SwapAmount§rollover: NaiveTimeRollover instant expressed in the replay’s timestamp zone.
triple_weekday: WeekdayWeekday whose rollover charges three nights at once.
skipped_weekdays: Vec<Weekday>Weekdays whose rollover charges nothing, normally the weekend.
Implementations§
Source§impl SwapSchedule
impl SwapSchedule
Sourcepub fn nights_at(&self, instant: NaiveDateTime) -> u32
pub fn nights_at(&self, instant: NaiveDateTime) -> u32
Number of nights charged by the rollover that occurs on instant.
Trait Implementations§
Source§impl Clone for SwapSchedule
impl Clone for SwapSchedule
Source§impl Debug for SwapSchedule
impl Debug for SwapSchedule
Source§impl<'de> Deserialize<'de> for SwapSchedule
impl<'de> Deserialize<'de> for SwapSchedule
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 PartialEq for SwapSchedule
impl PartialEq for SwapSchedule
Source§impl Serialize for SwapSchedule
impl Serialize for SwapSchedule
impl StructuralPartialEq for SwapSchedule
Auto Trait Implementations§
impl Freeze for SwapSchedule
impl RefUnwindSafe for SwapSchedule
impl Send for SwapSchedule
impl Sync for SwapSchedule
impl Unpin for SwapSchedule
impl UnsafeUnpin for SwapSchedule
impl UnwindSafe for SwapSchedule
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