pub struct MeteredBillingQuote {
pub quote_id: String,
pub provider: String,
pub billing_unit: String,
pub quoted_units: u64,
pub quoted_cost: MonetaryAmount,
pub issued_at: u64,
pub expires_at: Option<u64>,
}Expand description
Stable quote describing pre-execution metered billing expectations.
Fields§
§quote_id: StringStable quote identifier from the billing or metering authority.
provider: StringBilling or metering provider that issued the quote.
billing_unit: StringBilling unit used to interpret quoted_units (for example 1k_tokens).
quoted_units: u64Quoted number of billable units for the pre-execution estimate.
quoted_cost: MonetaryAmountQuoted monetary amount for the estimate.
issued_at: u64Unix timestamp (seconds) when the quote was issued.
expires_at: Option<u64>Optional Unix timestamp (seconds) when the quote expires.
Implementations§
Source§impl MeteredBillingQuote
impl MeteredBillingQuote
pub fn is_valid_at(&self, now: u64) -> bool
Trait Implementations§
Source§impl Clone for MeteredBillingQuote
impl Clone for MeteredBillingQuote
Source§fn clone(&self) -> MeteredBillingQuote
fn clone(&self) -> MeteredBillingQuote
Returns a duplicate of the value. Read more
1.0.0 · 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 MeteredBillingQuote
impl Debug for MeteredBillingQuote
Source§impl<'de> Deserialize<'de> for MeteredBillingQuote
impl<'de> Deserialize<'de> for MeteredBillingQuote
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<MeteredBillingQuote, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<MeteredBillingQuote, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for MeteredBillingQuote
impl PartialEq for MeteredBillingQuote
Source§impl Serialize for MeteredBillingQuote
impl Serialize for MeteredBillingQuote
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 Eq for MeteredBillingQuote
impl StructuralPartialEq for MeteredBillingQuote
Auto Trait Implementations§
impl Freeze for MeteredBillingQuote
impl RefUnwindSafe for MeteredBillingQuote
impl Send for MeteredBillingQuote
impl Sync for MeteredBillingQuote
impl Unpin for MeteredBillingQuote
impl UnsafeUnpin for MeteredBillingQuote
impl UnwindSafe for MeteredBillingQuote
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