Struct cosmwasm_std::testing::DistributionQuerier
source · pub struct DistributionQuerier { /* private fields */ }
Implementations§
source§impl DistributionQuerier
impl DistributionQuerier
pub fn new<T>(withdraw_addresses: T) -> Self
pub fn set_withdraw_address( &mut self, delegator_address: impl Into<String>, withdraw_address: impl Into<String> )
sourcepub fn set_withdraw_addresses(
&mut self,
withdraw_addresses: impl IntoIterator<Item = (impl Into<String>, impl Into<String>)>
)
pub fn set_withdraw_addresses( &mut self, withdraw_addresses: impl IntoIterator<Item = (impl Into<String>, impl Into<String>)> )
Sets multiple withdraw addresses.
This allows passing multiple tuples of (delegator_address, withdraw_address)
.
It does not overwrite existing entries.
pub fn clear_withdraw_addresses(&mut self)
sourcepub fn set_rewards(
&mut self,
validator: impl Into<String>,
delegator: impl Into<String>,
rewards: Vec<DecCoin>
)
pub fn set_rewards( &mut self, validator: impl Into<String>, delegator: impl Into<String>, rewards: Vec<DecCoin> )
Sets accumulated rewards for a given validator and delegator pair.
sourcepub fn set_validators(
&mut self,
delegator: impl Into<String>,
validators: impl IntoIterator<Item = impl Into<String>>
)
pub fn set_validators( &mut self, delegator: impl Into<String>, validators: impl IntoIterator<Item = impl Into<String>> )
Sets the validators a given delegator has bonded to.
pub fn query(&self, request: &DistributionQuery) -> QuerierResult
Trait Implementations§
source§impl Clone for DistributionQuerier
impl Clone for DistributionQuerier
source§fn clone(&self) -> DistributionQuerier
fn clone(&self) -> DistributionQuerier
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 moresource§impl Default for DistributionQuerier
impl Default for DistributionQuerier
source§fn default() -> DistributionQuerier
fn default() -> DistributionQuerier
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for DistributionQuerier
impl RefUnwindSafe for DistributionQuerier
impl Send for DistributionQuerier
impl Sync for DistributionQuerier
impl Unpin for DistributionQuerier
impl UnwindSafe for DistributionQuerier
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