pub trait PumpBox {
// Required method
fn run(
&self,
ctx: &Ctx<'_>,
order: &SignedOrder,
ask: &mut dyn Asker,
) -> OrderAck;
// Provided methods
fn health(&self) -> BTreeMap<String, String> { ... }
fn product_report(&self) -> Option<String> { ... }
fn own_review(&self) -> Option<String> { ... }
}Expand description
The product’s half of the pump: what its box reports, and what it does with an order.
Required Methods§
Provided Methods§
Sourcefn health(&self) -> BTreeMap<String, String>
fn health(&self) -> BTreeMap<String, String>
The box’s health words for Fleet.Report (serving, data, serves_at, twin, epoch).
Sourcefn product_report(&self) -> Option<String>
fn product_report(&self) -> Option<String>
monetize_product::pull::ProductReport as JSON — the main that serves sends it.
Sourcefn own_review(&self) -> Option<String>
fn own_review(&self) -> Option<String>
A twin reviews itself on every report (G12): its review as JSON.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".