pub struct DamlCommandFactory { /* private fields */ }Expand description
Factory for assembling DamlCommands payloads from a fixed set of
submission parameters (workflow id, user id, act-as parties, dedup
period, …) and a variable list of DamlCommands.
v2 dropped the single-party party field; submissions act on behalf
of the act_as set instead.
Implementations§
Source§impl DamlCommandFactory
impl DamlCommandFactory
pub fn new( workflow_id: impl Into<String>, user_id: impl Into<String>, act_as: impl Into<Vec<String>>, read_as: impl Into<Vec<String>>, deduplication_period: impl Into<Option<DamlCommandsDeduplicationPeriod>>, min_ledger_time: impl Into<Option<DamlMinLedgerTime>>, ) -> Self
pub fn workflow_id(&self) -> &str
pub fn user_id(&self) -> &str
pub fn act_as(&self) -> &[String]
pub fn read_as(&self) -> &[String]
pub const fn deduplication_period( &self, ) -> &Option<DamlCommandsDeduplicationPeriod>
pub const fn min_ledger_time(&self) -> &Option<DamlMinLedgerTime>
pub fn make_command(&self, command: DamlCommand) -> DamlCommands
pub fn make_command_with_id( &self, command: DamlCommand, command_id: impl Into<String>, ) -> DamlCommands
pub fn make_commands<S, V>( &self, commands: V, command_id: Option<S>, ) -> DamlCommands
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DamlCommandFactory
impl RefUnwindSafe for DamlCommandFactory
impl Send for DamlCommandFactory
impl Sync for DamlCommandFactory
impl Unpin for DamlCommandFactory
impl UnsafeUnpin for DamlCommandFactory
impl UnwindSafe for DamlCommandFactory
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