pub struct HierarchicalCommand {
pub command_id: String,
pub originator_id: String,
pub target: Option<CommandTarget>,
pub priority: i32,
pub buffer_policy: i32,
pub conflict_policy: i32,
pub acknowledgment_policy: i32,
pub leader_change_policy: i32,
pub issued_at: Option<Timestamp>,
pub expires_at: Option<Timestamp>,
pub version: u32,
pub command_type: Option<CommandType>,
}Expand description
Hierarchical command message
Commands flow downward through the hierarchy (platoon → squad → individual). Each command carries policy configurations that define its behavior during partition, conflict, acknowledgment, and leader change scenarios.
Fields§
§command_id: StringUnique command identifier (UUID)
originator_id: StringNode ID of the command originator
target: Option<CommandTarget>Target specification
priority: i32Command priority level
buffer_policy: i32Policy configurations (flexible behavior control)
conflict_policy: i32§acknowledgment_policy: i32§leader_change_policy: i32§issued_at: Option<Timestamp>Metadata
expires_at: Option<Timestamp>§version: u32For conflict resolution
command_type: Option<CommandType>Command type (oneof for extensibility)
Implementations§
Source§impl HierarchicalCommand
impl HierarchicalCommand
Sourcepub fn priority(&self) -> CommandPriority
pub fn priority(&self) -> CommandPriority
Returns the enum value of priority, or the default if the field is set to an invalid enum value.
Sourcepub fn set_priority(&mut self, value: CommandPriority)
pub fn set_priority(&mut self, value: CommandPriority)
Sets priority to the provided enum value.
Sourcepub fn buffer_policy(&self) -> BufferPolicy
pub fn buffer_policy(&self) -> BufferPolicy
Returns the enum value of buffer_policy, or the default if the field is set to an invalid enum value.
Sourcepub fn set_buffer_policy(&mut self, value: BufferPolicy)
pub fn set_buffer_policy(&mut self, value: BufferPolicy)
Sets buffer_policy to the provided enum value.
Sourcepub fn conflict_policy(&self) -> ConflictPolicy
pub fn conflict_policy(&self) -> ConflictPolicy
Returns the enum value of conflict_policy, or the default if the field is set to an invalid enum value.
Sourcepub fn set_conflict_policy(&mut self, value: ConflictPolicy)
pub fn set_conflict_policy(&mut self, value: ConflictPolicy)
Sets conflict_policy to the provided enum value.
Sourcepub fn acknowledgment_policy(&self) -> AcknowledgmentPolicy
pub fn acknowledgment_policy(&self) -> AcknowledgmentPolicy
Returns the enum value of acknowledgment_policy, or the default if the field is set to an invalid enum value.
Sourcepub fn set_acknowledgment_policy(&mut self, value: AcknowledgmentPolicy)
pub fn set_acknowledgment_policy(&mut self, value: AcknowledgmentPolicy)
Sets acknowledgment_policy to the provided enum value.
Sourcepub fn leader_change_policy(&self) -> LeaderChangePolicy
pub fn leader_change_policy(&self) -> LeaderChangePolicy
Returns the enum value of leader_change_policy, or the default if the field is set to an invalid enum value.
Sourcepub fn set_leader_change_policy(&mut self, value: LeaderChangePolicy)
pub fn set_leader_change_policy(&mut self, value: LeaderChangePolicy)
Sets leader_change_policy to the provided enum value.
Trait Implementations§
Source§impl Clone for HierarchicalCommand
impl Clone for HierarchicalCommand
Source§fn clone(&self) -> HierarchicalCommand
fn clone(&self) -> HierarchicalCommand
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for HierarchicalCommand
impl Debug for HierarchicalCommand
Source§impl Default for HierarchicalCommand
impl Default for HierarchicalCommand
Source§impl<'de> Deserialize<'de> for HierarchicalCommand
impl<'de> Deserialize<'de> for HierarchicalCommand
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Message for HierarchicalCommand
impl Message for HierarchicalCommand
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.Source§impl PartialEq for HierarchicalCommand
impl PartialEq for HierarchicalCommand
Source§fn eq(&self, other: &HierarchicalCommand) -> bool
fn eq(&self, other: &HierarchicalCommand) -> bool
self and other values to be equal, and is used by ==.