pub trait StateView {
// Required methods
fn verifying_contract(&self) -> Cow<'_, AccountIdRef>;
fn wnear_id(&self) -> Cow<'_, AccountIdRef>;
fn fee(&self) -> Pips;
fn fee_collector(&self) -> Cow<'_, AccountIdRef>;
fn has_public_key(
&self,
account_id: &AccountIdRef,
public_key: &PublicKey,
) -> bool;
fn iter_public_keys(
&self,
account_id: &AccountIdRef,
) -> impl Iterator<Item = PublicKey> + '_;
fn is_nonce_used(&self, account_id: &AccountIdRef, nonce: Nonce) -> bool;
fn balance_of(&self, account_id: &AccountIdRef, token_id: &TokenId) -> u128;
// Provided method
fn cached(self) -> CachedState<Self>
where Self: Sized { ... }
}
Required Methods§
fn verifying_contract(&self) -> Cow<'_, AccountIdRef>
fn wnear_id(&self) -> Cow<'_, AccountIdRef>
fn fee(&self) -> Pips
fn fee_collector(&self) -> Cow<'_, AccountIdRef>
fn has_public_key( &self, account_id: &AccountIdRef, public_key: &PublicKey, ) -> bool
fn iter_public_keys( &self, account_id: &AccountIdRef, ) -> impl Iterator<Item = PublicKey> + '_
fn is_nonce_used(&self, account_id: &AccountIdRef, nonce: Nonce) -> bool
fn balance_of(&self, account_id: &AccountIdRef, token_id: &TokenId) -> u128
Provided Methods§
fn cached(self) -> CachedState<Self>where
Self: Sized,
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.