pub struct Executable { /* private fields */ }Expand description
A prepared transaction with the signatures that authorize it.
Implementations§
Source§impl Executable
impl Executable
Sourcepub async fn and_sign_as(self, party: &str, signer: &dyn Signer) -> Result<Self>
pub async fn and_sign_as(self, party: &str, signer: &dyn Signer) -> Result<Self>
Add another party’s signature — for a multi-party submission, where the participant requires one per acting party.
§Errors
Sourcepub fn with_signature(self, party: &str, signature: &Signature) -> Result<Self>
pub fn with_signature(self, party: &str, signature: &Signature) -> Result<Self>
Attach a signature produced elsewhere — an offline ceremony, or a
service that returns signatures rather than implementing
Signer.
§Errors
Error::InvalidRequest if party is not among the acting parties.
Sourcepub fn with_deduplication_duration(self, duration: Duration) -> Self
pub fn with_deduplication_duration(self, duration: Duration) -> Self
Set the de-duplication period as a wall-clock duration: an execution with the same change ID within this window is rejected as a duplicate.
The change ID comes from preparation (user_id, act_as,
command_id), so this de-duplicates against ordinary submissions of the
same command too, not only against other executions.
Sourcepub fn with_deduplication_offset(self, offset: i64) -> Self
pub fn with_deduplication_offset(self, offset: i64) -> Self
Set the de-duplication period as a ledger offset: executions with the same change ID since that offset are rejected as duplicates.
Sourcepub fn with_submission_id(self, submission_id: impl Into<String>) -> Self
pub fn with_submission_id(self, submission_id: impl Into<String>) -> Self
Set the submission id — the identifier that distinguishes completions for different submissions of the same change ID.
Left unset, a fresh UUID is generated per attempt, which is what the Ledger API expects of a retried submission. Setting one fixes it across retries, which is a deliberate choice rather than a default.
Sourcepub fn with_transaction_shape(self, shape: TransactionShape) -> Self
pub fn with_transaction_shape(self, shape: TransactionShape) -> Self
Which events the returned transaction carries — only meaningful for
execute_submission_and_wait_for_transaction.
Sourcepub fn change_id(&self) -> ChangeId
pub fn change_id(&self) -> ChangeId
The command id, carried from preparation.
The change id the participant will de-duplicate by; see
Prepared::change_id.
Sourcepub fn command_id(&self) -> &str
pub fn command_id(&self) -> &str
One component of the change ID (user_id, act_as, command_id), and
what await_completion matches
on — so a caller using the fire-and-forget
execute_submission needs it
to recover the outcome.
Sourcepub fn unsigned_parties(&self) -> Vec<&str>
pub fn unsigned_parties(&self) -> Vec<&str>
Every acting party that has not signed yet.
The participant requires a signature per acting party; this is that check, before the round trip that would report it as a rejection.
Trait Implementations§
Source§impl Clone for Executable
impl Clone for Executable
Auto Trait Implementations§
impl Freeze for Executable
impl RefUnwindSafe for Executable
impl Send for Executable
impl Sync for Executable
impl Unpin for Executable
impl UnsafeUnpin for Executable
impl UnwindSafe for Executable
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
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>
T in a tonic::RequestSource§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>
T in a tonic::Request