pub struct DubpBlockV10 { /* private fields */ }Expand description
Wrap a Block document.
Must be created by parsing/deserialization or using a builder.
Implementations§
Source§impl DubpBlockV10
impl DubpBlockV10
pub fn identities(&self) -> &[IdentityDocumentV10]
pub fn joiners(&self) -> &[MembershipDocumentV10]
pub fn actives(&self) -> &[MembershipDocumentV10]
pub fn leavers(&self) -> &[MembershipDocumentV10]
pub fn revoked(&self) -> Vec<Cow<'_, CompactRevocationDocumentV10>>
pub fn excluded(&self) -> &[PublicKey]
pub fn certifications(&self) -> Vec<Cow<'_, CompactCertificationDocumentV10>>
pub fn transactions(&self) -> &[TransactionDocumentV10]
Sourcepub fn as_compact_text(&self) -> String
pub fn as_compact_text(&self) -> String
Needed only for BMA (to be removed)
Trait Implementations§
Source§impl Clone for DubpBlockV10
impl Clone for DubpBlockV10
Source§fn clone(&self) -> DubpBlockV10
fn clone(&self) -> DubpBlockV10
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DubpBlockV10
impl Debug for DubpBlockV10
Source§impl Default for DubpBlockV10
impl Default for DubpBlockV10
Source§fn default() -> DubpBlockV10
fn default() -> DubpBlockV10
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for DubpBlockV10
impl<'de> Deserialize<'de> for DubpBlockV10
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl DubpBlockTrait for DubpBlockV10
impl DubpBlockTrait for DubpBlockV10
type Signator = Signator
Source§fn common_time(&self) -> u64
fn common_time(&self) -> u64
Common time in block (also known as ‘blockchain time’)
Source§fn compute_hashed_string(&self) -> String
fn compute_hashed_string(&self) -> String
Compute the character string that hashed
Source§fn compute_signed_string(&self) -> String
fn compute_signed_string(&self) -> String
Compute the character string that will be signed
Source§fn current_frame_size(&self) -> usize
fn current_frame_size(&self) -> usize
Get current frame size (in blocks)
Source§fn currency_name(&self) -> CurrencyName
fn currency_name(&self) -> CurrencyName
Get currency name
Source§fn currency_parameters(&self) -> Option<CurrencyParameters>
fn currency_parameters(&self) -> Option<CurrencyParameters>
Get currency parameters
Source§fn dividend(&self) -> Option<SourceAmount>
fn dividend(&self) -> Option<SourceAmount>
Get universal dividend amount
Source§fn generate_compact_inner_text(&self) -> String
fn generate_compact_inner_text(&self) -> String
Generate compact inner text (for compute inner_hash)
Source§fn inner_hash(&self) -> Hash
fn inner_hash(&self) -> Hash
Get block inner hash
Source§fn issuers_count(&self) -> usize
fn issuers_count(&self) -> usize
Get number of compute members in the current frame
Source§fn issuers_frame(&self) -> usize
fn issuers_frame(&self) -> usize
Get size of the current frame (in blocks)
Source§fn local_time(&self) -> u64
fn local_time(&self) -> u64
Get local time
Source§fn members_count(&self) -> usize
fn members_count(&self) -> usize
Get number of members in wot
Source§fn monetary_mass(&self) -> u64
fn monetary_mass(&self) -> u64
Get monetary mass
Source§fn number(&self) -> BlockNumber
fn number(&self) -> BlockNumber
Get block number
Source§fn previous_blockstamp(&self) -> Blockstamp
fn previous_blockstamp(&self) -> Blockstamp
Get previous blockstamp
Source§fn previous_hash(&self) -> Hash
fn previous_hash(&self) -> Hash
Get previous hash
Source§fn reduce(&mut self)
fn reduce(&mut self)
Lightens the block (for example to store it while minimizing the space required)
Source§fn verify_inner_hash(&self) -> Result<(), VerifyBlockHashError>
fn verify_inner_hash(&self) -> Result<(), VerifyBlockHashError>
Verify inner hash
Source§fn verify_hash(&self) -> Result<(), VerifyBlockHashError>
fn verify_hash(&self) -> Result<(), VerifyBlockHashError>
Verify block hash
Source§fn compute_hash(&self) -> BlockHash
fn compute_hash(&self) -> BlockHash
Compute hash
Source§fn compute_inner_hash(&self) -> Hash
fn compute_inner_hash(&self) -> Hash
Compute inner hash
Source§impl FromStringObject for DubpBlockV10
impl FromStringObject for DubpBlockV10
Source§fn from_string_object(
stringified: &DubpBlockV10Stringified,
) -> Result<Self, TextParseError>
fn from_string_object( stringified: &DubpBlockV10Stringified, ) -> Result<Self, TextParseError>
Transforms object fields into string
Source§impl PartialEq for DubpBlockV10
impl PartialEq for DubpBlockV10
Source§impl Serialize for DubpBlockV10
impl Serialize for DubpBlockV10
Source§impl ToStringObject for DubpBlockV10
impl ToStringObject for DubpBlockV10
Source§fn to_string_object(&self) -> DubpBlockV10Stringified
fn to_string_object(&self) -> DubpBlockV10Stringified
Transforms an object into a json object
Source§type StringObject = DubpBlockV10Stringified
type StringObject = DubpBlockV10Stringified
Generated string object
impl StructuralPartialEq for DubpBlockV10
Auto Trait Implementations§
impl Freeze for DubpBlockV10
impl RefUnwindSafe for DubpBlockV10
impl Send for DubpBlockV10
impl Sync for DubpBlockV10
impl Unpin for DubpBlockV10
impl UnwindSafe for DubpBlockV10
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more