pub struct PreparedTransaction {
pub payload: Vec<u8>,
pub algorithm: Algorithm,
pub digest: PreparedDigest,
}Expand description
A transaction payload with its pre-computed algorithm-bound digest
Fields§
§payload: Vec<u8>§algorithm: Algorithm§digest: PreparedDigestImplementations§
Source§impl PreparedTransaction
impl PreparedTransaction
Sourcepub fn new(
payload: Vec<u8>,
algorithm: Algorithm,
) -> Result<PreparedTransaction, SigningError>
pub fn new( payload: Vec<u8>, algorithm: Algorithm, ) -> Result<PreparedTransaction, SigningError>
Creates a new prepared transaction, computing the digest for the given algorithm
Sourcepub fn verify_integrity(&self) -> Result<(), SigningError>
pub fn verify_integrity(&self) -> Result<(), SigningError>
Verifies that the stored digest matches a fresh recomputation from the payload
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PreparedTransaction
impl RefUnwindSafe for PreparedTransaction
impl Send for PreparedTransaction
impl Sync for PreparedTransaction
impl Unpin for PreparedTransaction
impl UnsafeUnpin for PreparedTransaction
impl UnwindSafe for PreparedTransaction
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request