Struct hedera::StakingInfo
source · pub struct StakingInfo {
pub decline_staking_reward: bool,
pub stake_period_start: Option<OffsetDateTime>,
pub pending_reward: Hbar,
pub staked_to_me: Hbar,
pub staked_account_id: Option<AccountId>,
pub staked_node_id: Option<u64>,
}
Expand description
Info related to account/contract staking settings.
Fields§
§decline_staking_reward: bool
If true
, the contract declines receiving a staking reward. The default value is false
.
stake_period_start: Option<OffsetDateTime>
The staking period during which either the staking settings for this account or contract changed (such as starting staking or changing staked_node_id) or the most recent reward was earned, whichever is later. If this account or contract is not currently staked to a node, then this field is not set.
pending_reward: Hbar
The amount in Hbar
that will be received in the next reward situation.
staked_to_me: Hbar
The total of balance of all accounts staked to this account or contract.
staked_account_id: Option<AccountId>
The account to which this account or contract is staking.
staked_node_id: Option<u64>
The ID of the node this account or contract is staked to.
Implementations§
source§impl StakingInfo
impl StakingInfo
sourcepub fn from_bytes(bytes: &[u8]) -> Result<Self>
pub fn from_bytes(bytes: &[u8]) -> Result<Self>
Create a new StakingInfo
from protobuf-encoded bytes
.
§Errors
Error::FromProtobuf
if decoding the bytes fails to produce a valid protobuf.Error::FromProtobuf
if decoding the protobuf fails.
Trait Implementations§
source§impl Clone for StakingInfo
impl Clone for StakingInfo
source§fn clone(&self) -> StakingInfo
fn clone(&self) -> StakingInfo
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for StakingInfo
impl RefUnwindSafe for StakingInfo
impl Send for StakingInfo
impl Sync for StakingInfo
impl Unpin for StakingInfo
impl UnwindSafe for StakingInfo
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
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request