pub struct CellAssignment {
pub assignment_id: String,
pub squad_id: String,
pub platform_ids: Vec<String>,
pub issued_by: String,
pub timestamp: u64,
pub priority: AssignmentPriority,
pub status: AssignmentStatus,
pub context: Option<String>,
}Expand description
Cell assignment message from C2
This message is broadcast via the sync backend and contains explicit platform-to-squad assignments. Platforms observe these messages and execute them if valid.
Fields§
§assignment_id: StringUnique identifier for this assignment
squad_id: StringTarget squad ID
platform_ids: Vec<String>List of platform IDs to assign to this squad
issued_by: StringC2 authority issuing the assignment
timestamp: u64Unix timestamp when assignment was issued
priority: AssignmentPriorityAssignment priority
status: AssignmentStatusCurrent status of the assignment
context: Option<String>Optional operational context or reason
Implementations§
Source§impl CellAssignment
impl CellAssignment
Sourcepub fn new(
assignment_id: String,
squad_id: String,
platform_ids: Vec<String>,
issued_by: String,
priority: AssignmentPriority,
) -> Self
pub fn new( assignment_id: String, squad_id: String, platform_ids: Vec<String>, issued_by: String, priority: AssignmentPriority, ) -> Self
Create a new squad assignment
Sourcepub fn with_context(self, context: String) -> Self
pub fn with_context(self, context: String) -> Self
Add operational context to the assignment
Sourcepub fn includes_platform(&self, platform_id: &str) -> bool
pub fn includes_platform(&self, platform_id: &str) -> bool
Check if assignment includes a specific platform
Sourcepub fn mark_in_progress(&mut self)
pub fn mark_in_progress(&mut self)
Mark assignment as in progress
Sourcepub fn mark_completed(&mut self)
pub fn mark_completed(&mut self)
Mark assignment as completed
Sourcepub fn mark_failed(&mut self, reason: String)
pub fn mark_failed(&mut self, reason: String)
Mark assignment as failed
Trait Implementations§
Source§impl Clone for CellAssignment
impl Clone for CellAssignment
Source§fn clone(&self) -> CellAssignment
fn clone(&self) -> CellAssignment
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CellAssignment
impl Debug for CellAssignment
Source§impl<'de> Deserialize<'de> for CellAssignment
impl<'de> Deserialize<'de> for CellAssignment
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for CellAssignment
impl RefUnwindSafe for CellAssignment
impl Send for CellAssignment
impl Sync for CellAssignment
impl Unpin for CellAssignment
impl UnsafeUnpin for CellAssignment
impl UnwindSafe for CellAssignment
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more