SignedCredits

Type Alias SignedCredits 

Source
pub type SignedCredits = i64;
Expand description

Signed Credits type is used for internal computations and total credits balance verification

Trait Implementations§

Source§

impl Creditable for SignedCredits

Source§

fn to_signed(&self) -> Result<SignedCredits, ProtocolError>

Convert unsigned credit to singed
Source§

fn to_unsigned(&self) -> Credits

Convert singed credit to unsigned
Source§

fn from_vec_bytes(vec: Vec<u8>) -> Result<Self, ProtocolError>

Decode bytes to credits
Source§

fn to_vec_bytes(&self) -> Vec<u8>

Encode credits to bytes