[][src]Struct dubp_documents::documents::transaction::TransactionDocument

pub struct TransactionDocument { /* fields omitted */ }

Wrap a Transaction document.

Must be created by parsing a text document or using a builder.

Methods

impl TransactionDocument[src]

pub fn compute_hash(&mut self) -> Hash[src]

Compute transaction hash

pub fn get_hash_opt(&self) -> Option<Hash>[src]

get transaction hash option

pub fn get_hash(&mut self) -> Hash[src]

Get transaction hash

pub fn get_inputs(&self) -> &[TransactionInput][src]

Get transaction inputs

pub fn get_outputs(&self) -> &[TransactionOutput][src]

Get transaction outputs

pub fn reduce(&mut self)[src]

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

pub fn from_pest_pair(
    pair: Pair<Rule>
) -> Result<TransactionDocument, TextDocumentParseError>
[src]

from pest parser pair

Trait Implementations

impl CompactTextDocument for TransactionDocument[src]

impl TextDocument for TransactionDocument[src]

type CompactTextDocument_ = TransactionDocument

Type of associated compact document.

fn as_text_without_signature(&self) -> &str[src]

Return document as text without signature.

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

Generate document compact text. the compact format is the one used in the blocks. Read more

impl Document for TransactionDocument[src]

type PublicKey = PubKey

Type of the PublicKey used by the document.

fn no_as_bytes(&self) -> bool[src]

Some documents do not directly store the sequence of bytes that will be signed but generate

fn to_bytes(&self) -> Vec<u8>[src]

Get document to bytes for signature verification.

fn verify_one_signature(
    &self,
    public_key: &Self::PublicKey,
    signature: &<Self::PublicKey as PublicKey>::Signature
) -> Result<(), SigError>
[src]

Verify one signature

fn verify_signatures(&self) -> Result<(), DocumentSigsErr>[src]

Verify signatures of document content (as text format)

impl ToStringObject for TransactionDocument[src]

impl Clone for TransactionDocument[src]

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

Performs copy-assignment from source. Read more

impl PartialEq<TransactionDocument> for TransactionDocument[src]

impl Eq for TransactionDocument[src]

impl Debug for TransactionDocument[src]

impl<'de> Deserialize<'de> for TransactionDocument[src]

impl Serialize for TransactionDocument[src]

Auto Trait Implementations

Blanket Implementations

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.

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

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

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.

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.

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

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self

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