pub struct TreasuryStorageBackend { /* private fields */ }Expand description
RocksDB-backed storage for treasury state
Implementations§
Source§impl TreasuryStorageBackend
impl TreasuryStorageBackend
Sourcepub fn persist_balance(&self, asset_id: &AssetId, balance: u128) -> Result<()>
pub fn persist_balance(&self, asset_id: &AssetId, balance: u128) -> Result<()>
Persists a treasury balance for an asset
Sourcepub fn persist_collected(
&self,
asset_id: &AssetId,
collected: u128,
) -> Result<()>
pub fn persist_collected( &self, asset_id: &AssetId, collected: u128, ) -> Result<()>
Persists total collected for an asset
Sourcepub fn persist_distributed(
&self,
asset_id: &AssetId,
distributed: u128,
) -> Result<()>
pub fn persist_distributed( &self, asset_id: &AssetId, distributed: u128, ) -> Result<()>
Persists total distributed for an asset
Sourcepub fn load_balance(&self, asset_id: &AssetId) -> Result<u128>
pub fn load_balance(&self, asset_id: &AssetId) -> Result<u128>
Loads a treasury balance for an asset
Sourcepub fn load_collected(&self, asset_id: &AssetId) -> Result<u128>
pub fn load_collected(&self, asset_id: &AssetId) -> Result<u128>
Loads total collected for an asset
Sourcepub fn load_distributed(&self, asset_id: &AssetId) -> Result<u128>
pub fn load_distributed(&self, asset_id: &AssetId) -> Result<u128>
Loads total distributed for an asset
Auto Trait Implementations§
impl !RefUnwindSafe for TreasuryStorageBackend
impl !UnwindSafe for TreasuryStorageBackend
impl Freeze for TreasuryStorageBackend
impl Send for TreasuryStorageBackend
impl Sync for TreasuryStorageBackend
impl Unpin for TreasuryStorageBackend
impl UnsafeUnpin for TreasuryStorageBackend
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