Struct diem_types::account_state_blob::AccountStateWithProof [−][src]
pub struct AccountStateWithProof { pub version: Version, pub blob: Option<AccountStateBlob>, pub proof: AccountStateProof, }
Fields
version: Version
Expand description
The transaction version at which this account state is seen.
blob: Option<AccountStateBlob>
Expand description
Blob value representing the account state. If this field is not set, it means the account does not exist.
proof: AccountStateProof
Expand description
The proof the client can use to authenticate the value.
Implementations
impl AccountStateWithProof
[src]
impl AccountStateWithProof
[src]pub fn new(
version: Version,
blob: Option<AccountStateBlob>,
proof: AccountStateProof
) -> Self
[src]
pub fn new(
version: Version,
blob: Option<AccountStateBlob>,
proof: AccountStateProof
) -> Self
[src]Constructor.
pub fn verify(
&self,
ledger_info: &LedgerInfo,
version: Version,
address: AccountAddress
) -> Result<()>
[src]
pub fn verify(
&self,
ledger_info: &LedgerInfo,
version: Version,
address: AccountAddress
) -> Result<()>
[src]Verifies the the account state blob with the proof, both carried by self
.
Two things are ensured if no error is raised:
- This account state exists in the ledger represented by
ledger_info
. - It belongs to account of
address
and is seen at the time the transaction at versionstate_version
is just committed. To make sure this is the latest state, pass inledger_info.version()
asstate_version
.
Trait Implementations
impl Clone for AccountStateWithProof
[src]
impl Clone for AccountStateWithProof
[src]fn clone(&self) -> AccountStateWithProof
[src]
fn clone(&self) -> AccountStateWithProof
[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]Performs copy-assignment from source
. Read more
impl Debug for AccountStateWithProof
[src]
impl Debug for AccountStateWithProof
[src]impl<'de> Deserialize<'de> for AccountStateWithProof
[src]
impl<'de> Deserialize<'de> for AccountStateWithProof
[src]fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]Deserialize this value from the given Serde deserializer. Read more
impl PartialEq<AccountStateWithProof> for AccountStateWithProof
[src]
impl PartialEq<AccountStateWithProof> for AccountStateWithProof
[src]fn eq(&self, other: &AccountStateWithProof) -> bool
[src]
fn eq(&self, other: &AccountStateWithProof) -> bool
[src]This method tests for self
and other
values to be equal, and is used
by ==
. Read more
fn ne(&self, other: &AccountStateWithProof) -> bool
[src]
fn ne(&self, other: &AccountStateWithProof) -> bool
[src]This method tests for !=
.
impl Serialize for AccountStateWithProof
[src]
impl Serialize for AccountStateWithProof
[src]impl Eq for AccountStateWithProof
[src]
impl StructuralEq for AccountStateWithProof
[src]
impl StructuralPartialEq for AccountStateWithProof
[src]
Auto Trait Implementations
impl RefUnwindSafe for AccountStateWithProof
impl Send for AccountStateWithProof
impl Sync for AccountStateWithProof
impl Unpin for AccountStateWithProof
impl UnwindSafe for AccountStateWithProof
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
impl<T> TestOnlyHash for T where
T: Serialize + ?Sized,
[src]
impl<T> TestOnlyHash for T where
T: Serialize + ?Sized,
[src]pub fn test_only_hash(&self) -> HashValue
[src]
pub fn test_only_hash(&self) -> HashValue
[src]Generates a hash used only for tests.
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
pub fn vzip(self) -> V
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,