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§fn clone(&self) -> SwapSchedule
fn clone(&self) -> SwapSchedule
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 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<SwapSchedule, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SwapSchedule, <__D as Deserializer<'de>>::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
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
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