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§
Sourcefn set_public_keys(
&mut self,
new_public_keys: BTreeMap<KeyID, IdentityPublicKey>,
)
fn set_public_keys( &mut self, new_public_keys: BTreeMap<KeyID, IdentityPublicKey>, )
Sets the public keys of the identity.
Sourcefn set_balance(&mut self, new_balance: u64)
fn set_balance(&mut self, new_balance: u64)
Sets the balance of the identity.
Sourcefn set_revision(&mut self, new_revision: Revision)
fn set_revision(&mut self, new_revision: Revision)
Sets the revision of the identity.
Sourcefn bump_revision(&mut self)
fn bump_revision(&mut self)
Sourcefn set_id(&mut self, new_id: Identifier)
fn set_id(&mut self, new_id: Identifier)
Sets the identifier of the identity.
Sourcefn increase_balance(&mut self, amount: u64) -> u64
fn increase_balance(&mut self, amount: u64) -> u64
Increase Identity balance
Sourcefn reduce_balance(&mut self, amount: u64) -> u64
fn reduce_balance(&mut self, amount: u64) -> u64
Reduce the Identity balance
Sourcefn increment_revision(&mut self) -> Result<(), ProtocolError>
fn increment_revision(&mut self) -> Result<(), ProtocolError>
Increment revision