pub enum CostPolicy {
Unlimited,
Hard {
max_units: u64,
},
Estimated {
max_units: u64,
},
}Expand description
The cost budget of one decision, in integer units the deployment chooses (spec 003, 3.5).
Variants§
Unlimited
Nothing is refused; charges are still recorded.
Hard
A guaranteed cap: every reachable backend must disclose an enforceable per-call upper bound, which is reserved before dispatch.
Estimated
The weaker policy: estimates are reserved, and the result is never labeled a cap.
Trait Implementations§
Source§impl Clone for CostPolicy
impl Clone for CostPolicy
impl Copy for CostPolicy
Source§impl Debug for CostPolicy
impl Debug for CostPolicy
Source§impl<'de> Deserialize<'de> for CostPolicy
impl<'de> Deserialize<'de> for CostPolicy
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 CostPolicy
Source§impl JsonSchema for CostPolicy
impl JsonSchema for CostPolicy
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 moreSource§impl PartialEq for CostPolicy
impl PartialEq for CostPolicy
Source§impl Serialize for CostPolicy
impl Serialize for CostPolicy
impl StructuralPartialEq for CostPolicy
Auto Trait Implementations§
impl Freeze for CostPolicy
impl RefUnwindSafe for CostPolicy
impl Send for CostPolicy
impl Sync for CostPolicy
impl Unpin for CostPolicy
impl UnsafeUnpin for CostPolicy
impl UnwindSafe for CostPolicy
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