pub trait Command {
// Required methods
fn priority(&self) -> Priority;
fn id(&self) -> CmdId;
fn parent(&self) -> Prior<Address>;
fn policy(&self) -> Option<&[u8]>;
fn bytes(&self) -> &[u8];
// Provided methods
fn max_cut(&self) -> Result<usize, Bug> { ... }
fn address(&self) -> Result<Address, Bug> { ... }
}Expand description
An action message interpreted by its associated policy to affect state.
A Command is opaque to the runtime engine. When the engine receives a
message, it is validated and serialized by its policy. The policy
returns a command implementation to update the stored graph. A
policy will also emit effects once a command is verified,
which are sent to the client.
Required Methods§
Sourcefn priority(&self) -> Priority
fn priority(&self) -> Priority
Return this command’s Priority, determining how this event is
ordered amongst others it does not have a causal relationship with.