pub struct DirectedAssignmentManager<B: DataSyncBackend> { /* private fields */ }Expand description
C2-Directed Assignment Manager
Processes C2-issued squad assignments and manages assignment lifecycle.
Implementations§
Source§impl<B: DataSyncBackend> DirectedAssignmentManager<B>
impl<B: DataSyncBackend> DirectedAssignmentManager<B>
Sourcepub fn new(store: CellStore<B>, my_platform_id: String) -> Self
pub fn new(store: CellStore<B>, my_platform_id: String) -> Self
Create a new directed assignment manager
Sourcepub fn with_timeout(self, timeout_secs: u64) -> Self
pub fn with_timeout(self, timeout_secs: u64) -> Self
Set assignment timeout
Sourcepub async fn process_assignment(
&mut self,
assignment: CellAssignment,
) -> Result<()>
pub async fn process_assignment( &mut self, assignment: CellAssignment, ) -> Result<()>
Process a received squad assignment
Sourcepub fn get_assignment(&self, assignment_id: &str) -> Option<&CellAssignment>
pub fn get_assignment(&self, assignment_id: &str) -> Option<&CellAssignment>
Get assignment by ID
Sourcepub fn active_assignments(&self) -> Vec<&CellAssignment>
pub fn active_assignments(&self) -> Vec<&CellAssignment>
Get all active assignments
Sourcepub fn cleanup_expired(&mut self)
pub fn cleanup_expired(&mut self)
Clean up expired assignments
Auto Trait Implementations§
impl<B> Freeze for DirectedAssignmentManager<B>
impl<B> !RefUnwindSafe for DirectedAssignmentManager<B>
impl<B> Send for DirectedAssignmentManager<B>
impl<B> Sync for DirectedAssignmentManager<B>
impl<B> Unpin for DirectedAssignmentManager<B>
impl<B> UnsafeUnpin for DirectedAssignmentManager<B>
impl<B> !UnwindSafe for DirectedAssignmentManager<B>
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> 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