pub struct BlokliTestStateSnapshot { /* private fields */ }Expand description
Snapshot of the BlokliTestState inside a BlokliTestClient.
Snapshots are cheap handles containing a cloned state view. Call refresh to
replace the stored view with the latest shared state.
Implementations§
Source§impl BlokliTestStateSnapshot
impl BlokliTestStateSnapshot
Sourcepub fn refresh(self) -> Self
pub fn refresh(self) -> Self
Refreshes the snapshot by fetching it from the BlokliTestClient.
Methods from Deref<Target = BlokliTestState>§
Sourcepub fn get_service_entry(
&self,
service_type: &ServiceTypeId,
node: &ChainAddress,
) -> Option<&ServiceEntry>
pub fn get_service_entry( &self, service_type: &ServiceTypeId, node: &ChainAddress, ) -> Option<&ServiceEntry>
Convenience method to return a reference to the ServiceEntry of a node for a service type.
Sourcepub fn get_service_type(
&self,
service_type: &ServiceTypeId,
) -> Option<&ServiceTypeInfo>
pub fn get_service_type( &self, service_type: &ServiceTypeId, ) -> Option<&ServiceTypeInfo>
Convenience method to return a reference to the ServiceTypeInfo of a service type.
Sourcepub fn get_account(&self, chain_key: &ChainAddress) -> Option<&Account>
pub fn get_account(&self, chain_key: &ChainAddress) -> Option<&Account>
Convenience method to return a reference to an Account with a given ChainAddress.
Sourcepub fn get_channel_by_id(&self, channel_id: &ChannelId) -> Option<&Channel>
pub fn get_channel_by_id(&self, channel_id: &ChannelId) -> Option<&Channel>
Sourcepub fn get_account_safe_token_balance(
&self,
chain_key: &ChainAddress,
) -> Option<&HoprBalance>
pub fn get_account_safe_token_balance( &self, chain_key: &ChainAddress, ) -> Option<&HoprBalance>
Convenience method to return a reference to Safe balance corresponding to the given ChainAddress of the
Account.
Sourcepub fn get_account_safe_native_balance(
&self,
chain_key: &ChainAddress,
) -> Option<&NativeBalance>
pub fn get_account_safe_native_balance( &self, chain_key: &ChainAddress, ) -> Option<&NativeBalance>
Convenience method to return a reference to the Safe’s native balance corresponding to the given
ChainAddress of the Account.
Sourcepub fn get_account_safe_allowance(
&self,
chain_key: &ChainAddress,
) -> Option<&SafeHoprAllowance>
pub fn get_account_safe_allowance( &self, chain_key: &ChainAddress, ) -> Option<&SafeHoprAllowance>
Convenience method to return a reference to Safe allowance corresponding to the given ChainAddress of the
Account.
Sourcepub fn get_safe_redeem_stats(
&self,
chain_address: &ChainAddress,
) -> Option<&RedeemedStats>
pub fn get_safe_redeem_stats( &self, chain_address: &ChainAddress, ) -> Option<&RedeemedStats>
Gets RedeemedStats for the given Safe address.
Sourcepub fn get_safe_by_owner(&self, owner: &ChainAddress) -> Vec<&Safe>
pub fn get_safe_by_owner(&self, owner: &ChainAddress) -> Vec<&Safe>
Convenience method to return references to Safes with the given owner’s ChainAddress.
Trait Implementations§
Source§impl AsRef<BlokliTestState> for BlokliTestStateSnapshot
impl AsRef<BlokliTestState> for BlokliTestStateSnapshot
Source§fn as_ref(&self) -> &BlokliTestState
fn as_ref(&self) -> &BlokliTestState
Source§impl Clone for BlokliTestStateSnapshot
impl Clone for BlokliTestStateSnapshot
Source§fn clone(&self) -> BlokliTestStateSnapshot
fn clone(&self) -> BlokliTestStateSnapshot
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for BlokliTestStateSnapshot
impl !UnwindSafe for BlokliTestStateSnapshot
impl Freeze for BlokliTestStateSnapshot
impl Send for BlokliTestStateSnapshot
impl Sync for BlokliTestStateSnapshot
impl Unpin for BlokliTestStateSnapshot
impl UnsafeUnpin for BlokliTestStateSnapshot
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more