pub trait Provider {
    type ExternalOrigin;
    type NodeId;
    type Balance;
    type Funds;
    type InternalError: Error;
    type Error: From<Self::InternalError>;
    type GasTree: LockableTree<ExternalOrigin = Self::ExternalOrigin, NodeId = Self::NodeId, Balance = Self::Balance, Funds = Self::Funds, InternalError = Self::InternalError, Error = Self::Error> + ReservableTree;

    // Provided method
    fn reset() { ... }
}
Expand description

Represents logic of centralized GasTree-algorithm.

Required Associated Types§

source

type ExternalOrigin

Type representing the external owner of a value (gas) item.

source

type NodeId

Type that identifies a tree node.

source

type Balance

Type representing a quantity of value.

source

type Funds

Type representing a quantity of token balance.

source

type InternalError: Error

Types to denote a result of some unbalancing operation - that is operations that create inequality between the underlying value supply and some hypothetical “collateral” asset.

source

type Error: From<Self::InternalError>

Error type.

source

type GasTree: LockableTree<ExternalOrigin = Self::ExternalOrigin, NodeId = Self::NodeId, Balance = Self::Balance, Funds = Self::Funds, InternalError = Self::InternalError, Error = Self::Error> + ReservableTree

A ledger to account for gas creation and consumption.

Provided Methods§

source

fn reset()

Resets all related to gas provider storages.

It’s a temporary production solution to avoid DB migrations and would be available for test purposes only in the future.

Object Safety§

This trait is not object safe.

Implementors§