pub struct BillingPeriod { /* private fields */ }Expand description
Time interval a recurring Payment Proof applies to.
§Validation
BillingPeriod::new validates the interval before construction. Payment
Proof and Receipt parsers use the same rules, which require
starts_at and ends_at to be RFC3339 timestamps with a Z suffix and
ends_at to be strictly later than starts_at.
Receipt Access still requires ReceiptAccess::validate
for its request context. A valid interval alone does not establish the
associated Payment Request ID.
Fields cannot be mutated after validated construction.
ⓘ
fn cannot_mutate(mut value: paykit_lib::BillingPeriod) {
value.ends_at = "invalid".into();
}Implementations§
Source§impl BillingPeriod
impl BillingPeriod
Trait Implementations§
Source§impl Clone for BillingPeriod
impl Clone for BillingPeriod
Source§impl Debug for BillingPeriod
impl Debug for BillingPeriod
impl Eq for BillingPeriod
Source§impl PartialEq for BillingPeriod
impl PartialEq for BillingPeriod
impl StructuralPartialEq for BillingPeriod
Auto Trait Implementations§
impl Freeze for BillingPeriod
impl RefUnwindSafe for BillingPeriod
impl Send for BillingPeriod
impl Sync for BillingPeriod
impl Unpin for BillingPeriod
impl UnsafeUnpin for BillingPeriod
impl UnwindSafe for BillingPeriod
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