IdentitySettersV0

Trait IdentitySettersV0 

Source
pub trait IdentitySettersV0 {
    // Required methods
    fn set_public_keys(
        &mut self,
        new_public_keys: BTreeMap<KeyID, IdentityPublicKey>,
    );
    fn set_balance(&mut self, new_balance: u64);
    fn set_revision(&mut self, new_revision: Revision);
    fn bump_revision(&mut self);
    fn set_id(&mut self, new_id: Identifier);
    fn increase_balance(&mut self, amount: u64) -> u64;
    fn reduce_balance(&mut self, amount: u64) -> u64;
    fn increment_revision(&mut self) -> Result<(), ProtocolError>;
}
Expand description

Trait for setters in Identity

Required Methods§

Source

fn set_public_keys( &mut self, new_public_keys: BTreeMap<KeyID, IdentityPublicKey>, )

Sets the public keys of the identity.

Source

fn set_balance(&mut self, new_balance: u64)

Sets the balance of the identity.

Source

fn set_revision(&mut self, new_revision: Revision)

Sets the revision of the identity.

Source

fn bump_revision(&mut self)

Sets the revision of the identity.

§Arguments
  • new_revision - The new revision as a Revision.
Source

fn set_id(&mut self, new_id: Identifier)

Sets the identifier of the identity.

Source

fn increase_balance(&mut self, amount: u64) -> u64

Increase Identity balance

Source

fn reduce_balance(&mut self, amount: u64) -> u64

Reduce the Identity balance

Source

fn increment_revision(&mut self) -> Result<(), ProtocolError>

Increment revision

Implementors§