#[non_exhaustive]pub struct CreatedEvent {
pub offset: i64,
pub node_id: i32,
pub contract_id: String,
pub template_id: Identifier,
pub package_name: String,
pub witness_parties: Vec<String>,
pub signatories: Vec<String>,
pub observers: Vec<String>,
pub created_at: Option<Timestamp>,
pub created_event_blob: Vec<u8>,
/* private fields */
}Expand description
A contract was created.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.offset: i64The offset of the transaction.
node_id: i32The node id within the transaction.
contract_id: StringThe new contract’s id.
template_id: IdentifierIts template.
package_name: StringThe package name of its template.
witness_parties: Vec<String>The subscribed parties the event is visible to.
signatories: Vec<String>The contract’s signatories.
observers: Vec<String>The contract’s observers.
created_at: Option<Timestamp>When the contract was created.
created_event_blob: Vec<u8>The blob that lets another party submit with this contract disclosed; empty unless the read asked for it.
Implementations§
Source§impl CreatedEvent
impl CreatedEvent
Sourcepub fn decode<T>(&self) -> Result<T, ValueError>where
T: Template + DeserializeOwned,
pub fn decode<T>(&self) -> Result<T, ValueError>where
T: Template + DeserializeOwned,
Decode the payload as the generated type T, checking first that the
event is T (module, entity and package name; the package id is not
compared, so an upgraded version decodes).
§Errors
ValueError if the event is another template or its
payload does not decode as T.
Sourcepub fn as_grpc(&self) -> Option<&CreatedEvent>
pub fn as_grpc(&self) -> Option<&CreatedEvent>
The event as gRPC delivered it, if it came over gRPC.
Trait Implementations§
Source§impl Clone for CreatedEvent
impl Clone for CreatedEvent
Auto Trait Implementations§
impl Freeze for CreatedEvent
impl RefUnwindSafe for CreatedEvent
impl Send for CreatedEvent
impl Sync for CreatedEvent
impl Unpin for CreatedEvent
impl UnsafeUnpin for CreatedEvent
impl UnwindSafe for CreatedEvent
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
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>
Wrap the input message
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>
Wrap the input message
T in a tonic::Request