Struct dubp_block::DubpBlockV10[][src]

pub struct DubpBlockV10 { /* fields omitted */ }
Expand description

Wrap a Block document.

Must be created by parsing/deserialization or using a builder.

Implementations

impl DubpBlockV10[src]

pub fn identities(&self) -> &[IdentityDocumentV10][src]

pub fn joiners(&self) -> &[MembershipDocumentV10][src]

pub fn actives(&self) -> &[MembershipDocumentV10][src]

pub fn leavers(&self) -> &[MembershipDocumentV10][src]

pub fn revoked(&self) -> Vec<Cow<'_, CompactRevocationDocumentV10>>[src]

pub fn excluded(&self) -> &[PublicKey][src]

pub fn certifications(&self) -> Vec<Cow<'_, CompactCertificationDocumentV10>>[src]

pub fn transactions(&self) -> &[TransactionDocumentV10][src]

pub fn as_compact_text(&self) -> String[src]

Needed only for BMA (to be removed)

Trait Implementations

impl Clone for DubpBlockV10[src]

fn clone(&self) -> DubpBlockV10[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for DubpBlockV10[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl Default for DubpBlockV10[src]

fn default() -> DubpBlockV10[src]

Returns the “default value” for a type. Read more

impl<'de> Deserialize<'de> for DubpBlockV10[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 DubpBlockTrait for DubpBlockV10[src]

type Signator = Signator

fn common_time(&self) -> u64[src]

Common time in block (also known as ‘blockchain time’)

fn compute_hashed_string(&self) -> String[src]

Compute the character string that hashed

fn compute_signed_string(&self) -> String[src]

Compute the character string that will be signed

fn current_frame_size(&self) -> usize[src]

Get current frame size (in blocks)

fn currency_parameters(&self) -> Option<CurrencyParameters>[src]

Get currency parameters

fn dividend(&self) -> Option<SourceAmount>[src]

Get universal dividend amount

fn generate_compact_inner_text(&self) -> String[src]

Generate compact inner text (for compute inner_hash)

fn hash(&self) -> BlockHash[src]

Get block hash

fn inner_hash(&self) -> Hash[src]

Get block inner hash

fn issuers_count(&self) -> usize[src]

Get number of compute members in the current frame

fn issuers_frame(&self) -> usize[src]

Get size of the current frame (in blocks)

fn issuer(&self) -> PublicKey[src]

Get block issuer

fn local_time(&self) -> u64[src]

Get local time

fn members_count(&self) -> usize[src]

Get number of members in wot

fn monetary_mass(&self) -> u64[src]

Get monetary mass

fn nonce(&self) -> u64[src]

Get block nonce

fn number(&self) -> BlockNumber[src]

Get block number

fn pow_min(&self) -> usize[src]

Get common difficulty (PoW)

fn previous_blockstamp(&self) -> Blockstamp[src]

Get previous blockstamp

fn previous_hash(&self) -> Hash[src]

Get previous hash

fn reduce(&mut self)[src]

Lightens the block (for example to store it while minimizing the space required)

fn sign(&mut self, signator: &Self::Signator) -> Result<(), SignError>[src]

Sign block

fn signature(&self) -> Signature[src]

Get block signature

fn verify_inner_hash(&self) -> Result<(), VerifyBlockHashError>[src]

Verify inner hash

fn verify_signature(&self) -> Result<(), SigError>[src]

Verify signature

fn verify_hash(&self) -> Result<(), VerifyBlockHashError>[src]

Verify block hash

fn unit_base(&self) -> usize[src]

Get unit base

fn compute_hash(&self) -> BlockHash[src]

Compute hash

fn compute_inner_hash(&self) -> Hash[src]

Compute inner hash

impl FromStringObject for DubpBlockV10[src]

fn from_string_object(
    stringified: &DubpBlockV10Stringified
) -> Result<Self, TextParseError>
[src]

Transforms object fields into string

impl PartialEq<DubpBlockV10> for DubpBlockV10[src]

fn eq(&self, other: &DubpBlockV10) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, other: &DubpBlockV10) -> bool[src]

This method tests for !=.

impl Serialize for DubpBlockV10[src]

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
    __S: Serializer
[src]

Serialize this value into the given Serde serializer. Read more

impl ToStringObject for DubpBlockV10[src]

fn to_string_object(&self) -> DubpBlockV10Stringified[src]

Transforms an object into a json object

type StringObject = DubpBlockV10Stringified

Generated string object

impl StructuralPartialEq for DubpBlockV10[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> Pointable for T

pub const ALIGN: usize

The alignment of pointer.

type Init = T

The type for initializers.

pub unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more

pub unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more

pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more

pub unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToJsonObject for T where
    T: ToStringObject
[src]

fn to_json_string(&self) -> Result<String, Error>[src]

Convert to JSON String

fn to_json_string_pretty(&self) -> Result<String, Error>[src]

Convert to JSON String pretty

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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]

🔬 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<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]