Crate grovedb_costs

Crate grovedb_costs 

Source
Expand description

Interface crate to unify how operations’ costs are passed and retrieved.

Re-exports§

pub use context::CostContext;
pub use context::CostResult;
pub use context::CostsExt;

Modules§

context
Cost Contexts
error
Cost Errors
storage_cost
Storage Costs

Macros§

cost_return_on_error
Macro to achieve kind of what the ? operator does, but with CostContext on top.
cost_return_on_error_default
Macro to achieve kind of what the ? operator does, but with CostContext on top. The difference between this macro and cost_return_on_error is that it is intended to be used on Result rather than CostContext<Result<..>>, so no costs will be added except previously accumulated. The error case returns a default OperationCost.
cost_return_on_error_into
Macro to achieve kind of what the ? operator does, but with CostContext on top.
cost_return_on_error_into_default
Macro to achieve kind of what the ? operator does, but with CostContext on top. The difference between this macro and cost_return_on_error is that it is intended to be used on Result rather than CostContext<Result<..>>, so no costs will be added except previously accumulated. The error case returns a default OperationCost.
cost_return_on_error_into_no_add
Macro to achieve kind of what the ? operator does, but with CostContext on top. The difference between this macro and cost_return_on_error is that it is intended to be used on Result rather than CostContext<Result<..>>, so no costs will be added except previously accumulated.
cost_return_on_error_no_add
Macro to achieve kind of what the ? operator does, but with CostContext on top. The difference between this macro and cost_return_on_error is that it is intended to be used on Result rather than CostContext<Result<..>>, so no costs will be added except previously accumulated.

Structs§

OperationCost
Piece of data representing affected computer resources (approximately).

Enums§

TreeCostType
The tree cost type

Type Aliases§

ChildKeyLength
Child key length
ChildSumLength
Child sum length
ChildrenSizes
Children sizes
ChildrenSizesWithIsSumTree
Children sizes starting with if we are in a sum tree
ChildrenSizesWithValue
Children sizes starting with a value
FeatureSumLength
Feature sum length