Struct indy_vdr::pool::PreparedRequest[][src]

pub struct PreparedRequest {
    pub protocol_version: ProtocolVersion,
    pub txn_type: String,
    pub req_id: String,
    pub req_json: SJsonValue,
    pub method: RequestMethod,
}

A ledger transaction request which has been prepared for dispatch

Fields

protocol_version: ProtocolVersion

The protocol version used in pool communication

txn_type: String

The numeric transaction type

req_id: String

The numeric transaction request ID

req_json: SJsonValue

The request body as a serde_json::Value instance

method: RequestMethod

Determine the request handler to use

Implementations

impl PreparedRequest[src]

pub fn new(
    protocol_version: ProtocolVersion,
    txn_type: String,
    req_id: String,
    req_json: SJsonValue,
    method: Option<RequestMethod>
) -> Self
[src]

Create a new PreparedRequest

pub fn get_signature_input(&self) -> VdrResult<String>[src]

Generate the normalized representation of a transaction for signing the request

pub fn set_endorser(&mut self, endorser: &DidValue) -> VdrResult<()>[src]

Assign the endorser property of the prepared request

pub fn set_signature(&mut self, signature: &[u8]) -> VdrResult<()>[src]

Assign the signature property of the prepared request

pub fn set_multi_signature(
    &mut self,
    identifier: &DidValue,
    signature: &[u8]
) -> VdrResult<()>
[src]

Add a signature to the prepared request

pub fn set_txn_author_agreement_acceptance(
    &mut self,
    acceptance: &TxnAuthrAgrmtAcceptanceData
) -> VdrResult<()>
[src]

Decorate the prepared request with the transaction author agreement acceptance

pub fn from_request_json<T: AsRef<[u8]>>(
    message: T
) -> VdrResult<PreparedRequest>
[src]

Construct a prepared request from user-provided JSON

pub fn from_request_json_ext(
    req_json: SJsonValue,
    auto_pop: bool,
    method: Option<RequestMethod>
) -> VdrResult<PreparedRequest>
[src]

Construct a prepared request from user-provided JSON

Trait Implementations

impl Debug for PreparedRequest[src]

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

Formats the value using the given formatter. Read more

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> Same<T> for T

type Output = T

Should always be Self

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<V, T> VZip<V> for T where
    V: MultiLane<T>, 

pub fn vzip(self) -> V