pub struct DeploymentDirective {
pub directive_id: String,
pub issued_at: DateTime<Utc>,
pub issuer_node_id: String,
pub issuer_formation_id: Option<String>,
pub scope: DeploymentScope,
pub artifact: ArtifactSpec,
pub capabilities: Vec<String>,
pub config: Value,
pub options: DeploymentOptions,
}Expand description
Deployment directive - command to deploy software to nodes
This is the primary message type for C2 → Edge software deployment. Nodes matching the scope will fetch the artifact and activate it.
Fields§
§directive_id: StringUnique directive identifier
issued_at: DateTime<Utc>When the directive was issued
issuer_node_id: StringNode ID of the issuer
issuer_formation_id: Option<String>Formation ID of the issuer (for hierarchy routing)
scope: DeploymentScopeTarget scope for this deployment
artifact: ArtifactSpecArtifact specification
capabilities: Vec<String>Capabilities this deployment provides
config: ValueRuntime-specific configuration
options: DeploymentOptionsDeployment options
Implementations§
Source§impl DeploymentDirective
impl DeploymentDirective
Sourcepub fn with_issuer(self, node_id: impl Into<String>) -> Self
pub fn with_issuer(self, node_id: impl Into<String>) -> Self
Set the issuer node
Sourcepub fn with_formation(self, formation_id: impl Into<String>) -> Self
pub fn with_formation(self, formation_id: impl Into<String>) -> Self
Set the issuer formation
Sourcepub fn with_scope(self, scope: DeploymentScope) -> Self
pub fn with_scope(self, scope: DeploymentScope) -> Self
Set the deployment scope
Sourcepub fn with_artifact(self, artifact: ArtifactSpec) -> Self
pub fn with_artifact(self, artifact: ArtifactSpec) -> Self
Set the artifact
Sourcepub fn with_capabilities(self, capabilities: Vec<String>) -> Self
pub fn with_capabilities(self, capabilities: Vec<String>) -> Self
Add capabilities
Sourcepub fn with_capability(self, capability: impl Into<String>) -> Self
pub fn with_capability(self, capability: impl Into<String>) -> Self
Add a capability
Sourcepub fn with_config(self, config: Value) -> Self
pub fn with_config(self, config: Value) -> Self
Set runtime config
Sourcepub fn with_options(self, options: DeploymentOptions) -> Self
pub fn with_options(self, options: DeploymentOptions) -> Self
Set deployment options
Sourcepub fn with_priority(self, priority: DeploymentPriority) -> Self
pub fn with_priority(self, priority: DeploymentPriority) -> Self
Set priority
Sourcepub fn targets_node(&self, node_id: &str) -> bool
pub fn targets_node(&self, node_id: &str) -> bool
Check if this directive targets a specific node
Trait Implementations§
Source§impl Clone for DeploymentDirective
impl Clone for DeploymentDirective
Source§fn clone(&self) -> DeploymentDirective
fn clone(&self) -> DeploymentDirective
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 DeploymentDirective
impl Debug for DeploymentDirective
Source§impl<'de> Deserialize<'de> for DeploymentDirective
impl<'de> Deserialize<'de> for DeploymentDirective
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 DeploymentDirective
impl RefUnwindSafe for DeploymentDirective
impl Send for DeploymentDirective
impl Sync for DeploymentDirective
impl Unpin for DeploymentDirective
impl UnsafeUnpin for DeploymentDirective
impl UnwindSafe for DeploymentDirective
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