pub struct Meta {
pub attribution: Attribution,
pub occurred_at: Option<Timestamp>,
pub idempotency_key: Option<String>,
pub expected_version: Option<u64>,
pub reason: Option<String>,
pub tag: Option<NamespacedName>,
pub visibility: Visibility,
}Expand description
Metadata common to every command.
Fields§
§attribution: Attribution§occurred_at: Option<Timestamp>When it happened according to the actor; defaults to now.
idempotency_key: Option<String>Retrying a command with the same key returns the original result.
expected_version: Option<u64>Reject the command unless the record is at this version.
reason: Option<String>§tag: Option<NamespacedName>§visibility: VisibilityImplementations§
Source§impl Meta
impl Meta
pub fn by(attribution: Attribution) -> Self
pub fn reason(self, r: impl Into<String>) -> Self
pub fn idempotency_key(self, k: impl Into<String>) -> Self
pub fn expect_version(self, v: u64) -> Self
pub fn tag(self, t: NamespacedName) -> Self
pub fn occurred_at(self, t: Timestamp) -> Self
pub fn visibility(self, v: Visibility) -> Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Meta
impl RefUnwindSafe for Meta
impl Send for Meta
impl Sync for Meta
impl Unpin for Meta
impl UnsafeUnpin for Meta
impl UnwindSafe for Meta
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