pub struct Metering {
pub requests: u64,
pub budgets: Vec<Metered>,
}Expand description
Everything one source has sent to its backend since it was built, and what that spent against each budget the backend meters it by.
A running total, never a figure per call. What one piece of work cost is the difference between a reading taken before it and one taken after, which is how the engine reports what a copy spent; a source that reset its figures between readings would make that difference meaningless.
Source-owned, in an open vocabulary. Only the source knows what it sent and how its backend meters it, so the budget and unit names are the source’s own. The engine adds figures up by name and interprets none of them.
Fields§
§requests: u64How many requests this source has sent to its backend.
budgets: Vec<Metered>What those requests spent, one entry per budget.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Metering
impl<'de> Deserialize<'de> for Metering
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
impl Eq for Metering
Source§impl JsonSchema for Metering
impl JsonSchema for Metering
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreimpl StructuralPartialEq for Metering
Auto Trait Implementations§
impl Freeze for Metering
impl RefUnwindSafe for Metering
impl Send for Metering
impl Sync for Metering
impl Unpin for Metering
impl UnsafeUnpin for Metering
impl UnwindSafe for Metering
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