pub struct Exercise<C> { /* private fields */ }Expand description
An exercised choice as PQS holds it.
Implementations§
Source§impl<C> Exercise<C>
impl<C> Exercise<C>
Sourcepub fn contract_id(&self) -> &str
pub fn contract_id(&self) -> &str
The contract the choice was exercised on.
Sourcepub fn result(&self) -> &Value
pub fn result(&self) -> &Value
The result, untyped.
A choice’s return type is not the argument’s, and PQS does not say which
it is — so this stays JSON rather than pretending to a type it cannot
know. Decode it with result_as.
Sourcepub fn result_as<R: DeserializeOwned>(&self) -> Result<R>
pub fn result_as<R: DeserializeOwned>(&self) -> Result<R>
Decode the result into a type the caller knows it to be.
§Errors
Error::Payload if it does not match.
Sourcepub fn exercised_at_offset(&self) -> i64
pub fn exercised_at_offset(&self) -> i64
The offset it was exercised at.
Sourcepub fn exercised_effective_at(&self) -> Option<OffsetDateTime>
pub fn exercised_effective_at(&self) -> Option<OffsetDateTime>
Ledger effective time of the exercise.
Sourcepub fn controllers(&self) -> &[String]
pub fn controllers(&self) -> &[String]
The parties that exercised it.
Source§impl<C: DeserializeOwned> Exercise<C>
impl<C: DeserializeOwned> Exercise<C>
Trait Implementations§
Auto Trait Implementations§
impl<C> Freeze for Exercise<C>where
C: Freeze,
impl<C> RefUnwindSafe for Exercise<C>where
C: RefUnwindSafe,
impl<C> Send for Exercise<C>where
C: Send,
impl<C> Sync for Exercise<C>where
C: Sync,
impl<C> Unpin for Exercise<C>where
C: Unpin,
impl<C> UnsafeUnpin for Exercise<C>where
C: UnsafeUnpin,
impl<C> UnwindSafe for Exercise<C>where
C: UnwindSafe,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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