Skip to main content

BusinessCommand

Struct BusinessCommand 

Source
pub struct BusinessCommand { /* private fields */ }
Expand description

Typed command dispatched by a page or dynamic component to mutate host-owned authoritative state.

Implementations§

Source§

impl BusinessCommand

Builder and accessor methods for BusinessCommand.

Source

pub fn expected_revision_value(&self) -> Option<u64>

Returns the optional expected optimistic concurrency revision.

§Returns
  • Option<u64> - Expected entity revision if set.
Source

pub fn with_expected_revision(self, revision: u64) -> Self

Attaches an optimistic concurrency expected revision to this command.

§Arguments
  • u64 - Expected live entity revision.
§Returns
  • Self - Updated command.
Source

pub fn with_idempotency_key(self, key: String) -> Self

Attaches a caller-supplied idempotency key for deduplication across retries.

§Arguments
  • String - Stable idempotency key.
§Returns
  • Self - Updated command.
Source

pub fn with_origin_generation(self, generation: u64) -> Self

Records the release generation active on the originating route when this command was issued.

§Arguments
  • u64 - Originating release generation identifier.
§Returns
  • Self - Updated command.
Source§

impl BusinessCommand

Source

pub fn get_entity_id(&self) -> &String

Source

pub fn get_mut_entity_id(&mut self) -> &mut String

Source

pub fn set_entity_id(&mut self, val: String) -> &mut Self

Source

pub fn get_command_name(&self) -> &String

Source

pub fn get_mut_command_name(&mut self) -> &mut String

Source

pub fn set_command_name(&mut self, val: String) -> &mut Self

Source

pub fn get_mut_expected_revision(&mut self) -> &mut Option<u64>

Source

pub fn set_expected_revision(&mut self, val: Option<u64>) -> &mut Self

Source

pub fn get_idempotency_key(&self) -> &String

Source

pub fn get_mut_idempotency_key(&mut self) -> &mut String

Source

pub fn set_idempotency_key(&mut self, val: String) -> &mut Self

Source

pub fn get_origin_generation(&self) -> u64

Source

pub fn get_mut_origin_generation(&mut self) -> &mut u64

Source

pub fn set_origin_generation(&mut self, val: u64) -> &mut Self

Source

pub fn get_payload(&self) -> &Value

Source

pub fn get_mut_payload(&mut self) -> &mut Value

Source

pub fn set_payload(&mut self, val: Value) -> &mut Self

Source§

impl BusinessCommand

Source

pub fn new(entity_id: String, command_name: String, payload: Value) -> Self

Trait Implementations§

Source§

impl Clone for BusinessCommand

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for BusinessCommand

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for BusinessCommand

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for BusinessCommand

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for BusinessCommand

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for BusinessCommand

Auto Trait Implementations§

§

impl Forget for BusinessCommand

§

impl Freeze for BusinessCommand
where *const u8 is !null: Freeze, PhantomData<u8>: Freeze, PhantomData<Value>: Freeze, *const LeafNode<String, Value> is !null: Freeze, PhantomData<(Owned, LeafOrInternal)>: Freeze, PhantomData<Box<(String, Value)>>: Freeze,

§

impl Move for BusinessCommand

§

impl RefUnwindSafe for BusinessCommand

§

impl Send for BusinessCommand
where RawVecInner: Send, NodeRef<Owned, String, Value, LeafOrInternal>: Send, BoxRaw<(String, Value)>: Send,

§

impl Sync for BusinessCommand
where RawVecInner: Sync, NodeRef<Owned, String, Value, LeafOrInternal>: Sync, BoxRaw<(String, Value)>: Sync,

§

impl Unpin for BusinessCommand
where *const u8 is !null: Unpin, *const LeafNode<String, Value> is !null: Unpin, Box<(String, Value)>: Unpin,

§

impl UnsafeUnpin for BusinessCommand

§

impl UnwindSafe for BusinessCommand
where RawVecInner: UnwindSafe, BTreeMap<String, Value>: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.