pub struct ServiceInfo {
pub code_hash: CodeHash,
pub balance: Balance,
pub threshold: Balance,
pub min_item_gas: UnsignedGas,
pub min_memo_gas: UnsignedGas,
pub bytes: u64,
pub items: u32,
pub deposit_offset: Balance,
pub creation_slot: Slot,
pub last_accumulation_slot: Slot,
pub parent_service: ServiceId,
}Expand description
Information concerning a particular service’s state.
This is used in the service_info host-call.
Fields§
§code_hash: CodeHashThe hash of the code of the service.
balance: BalanceThe existing balance of the service.
threshold: BalanceThe minimum balance which the service must satisfy.
min_item_gas: UnsignedGasThe minimum amount of gas which must be provided to this service’s accumulate for each
work item it must process.
min_memo_gas: UnsignedGasThe minimum amount of gas which must be provided to this service’s accumulate for each
incoming transfer it must process.
bytes: u64The total number of bytes used for data electively held for this service on-chain.
items: u32The total number of items of data electively held for this service on-chain.
deposit_offset: BalanceOffset of storage footprint only above which a minimum deposit is needed.
creation_slot: SlotCreation time slot.
last_accumulation_slot: SlotMost recent accumulation time slot.
parent_service: ServiceIdParent service identifier.
Implementations§
Source§impl ServiceInfo
impl ServiceInfo
Sourcepub const CODE_HASH_OFFSET: usize = 0usize
pub const CODE_HASH_OFFSET: usize = 0usize
Field offsets in the encoded representation
pub const BALANCE_OFFSET: usize = 32usize
pub const THRESHOLD_OFFSET: usize = 40usize
pub const MIN_ITEM_GAS_OFFSET: usize = 48usize
pub const MIN_MEMO_GAS_OFFSET: usize = 56usize
pub const BYTES_OFFSET: usize = 64usize
pub const ITEMS_OFFSET: usize = 72usize
pub const DEPOSIT_OFFSET_OFFSET: usize = 76usize
pub const CREATION_SLOT_OFFSET: usize = 84usize
pub const LAST_ACCUMULATION_SLOT_OFFSET: usize = 88usize
pub const PARENT_SERVICE_OFFSET: usize = 92usize
Sourcepub const ENCODED_LEN: usize = 96usize
pub const ENCODED_LEN: usize = 96usize
Encoded length in bytes.
Trait Implementations§
Source§impl Clone for ServiceInfo
impl Clone for ServiceInfo
Source§fn clone(&self) -> ServiceInfo
fn clone(&self) -> ServiceInfo
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more