pub struct DamlEventQueryService<'a> { /* private fields */ }Expand description
Look up the create + consuming-archive events for a single contract by id. Distinct from streaming history because the participant returns just the two endpoint events, not the full transaction(s) they appeared in.
Contract-key lookup is not supported in v2; multi-synchronizer
participants don’t (yet) have a globally unique contract-key
notion. Use get_events_by_contract_id when the contract id is
in hand.
Implementations§
Source§impl<'a> DamlEventQueryService<'a>
impl<'a> DamlEventQueryService<'a>
pub fn new(channel: Channel, auth_token: Option<&'a str>) -> Self
Sourcepub fn with_token(self, auth_token: &'a str) -> Self
pub fn with_token(self, auth_token: &'a str) -> Self
Override the JWT token to use for this service.
Sourcepub async fn get_events_by_contract_id(
&self,
contract_id: impl Into<String> + Debug,
event_format: DamlEventFormat,
) -> DamlResult<DamlEventsByContractId>
pub async fn get_events_by_contract_id( &self, contract_id: impl Into<String> + Debug, event_format: DamlEventFormat, ) -> DamlResult<DamlEventsByContractId>
Fetch the create and archive events for contract_id.
Events are filtered through event_format; results take
ACS-delta shape regardless of any transaction_shape setting.
Returns CONTRACT_EVENTS_NOT_FOUND when the contract is
unknown to the participant or every matching event has been
pruned.
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for DamlEventQueryService<'a>
impl<'a> !UnwindSafe for DamlEventQueryService<'a>
impl<'a> Freeze for DamlEventQueryService<'a>
impl<'a> Send for DamlEventQueryService<'a>
impl<'a> Sync for DamlEventQueryService<'a>
impl<'a> Unpin for DamlEventQueryService<'a>
impl<'a> UnsafeUnpin for DamlEventQueryService<'a>
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§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