pub struct ModelUpdateCommand {
pub command_id: String,
pub manifest: ModelManifest,
pub target_nodes: Vec<String>,
pub priority: u8,
pub auto_load: bool,
pub rollback_model_id: Option<String>,
pub timestamp: DateTime<Utc>,
}Expand description
Command to push a model update to nodes
Fields§
§command_id: StringUnique command ID
manifest: ModelManifestModel manifest
target_nodes: Vec<String>Target node IDs (empty = broadcast to all capable nodes)
priority: u8Priority (1-5, 1 = highest)
auto_load: boolWhether to auto-load after download
rollback_model_id: Option<String>Model ID to rollback to if update fails
timestamp: DateTime<Utc>Command timestamp
Implementations§
Source§impl ModelUpdateCommand
impl ModelUpdateCommand
Sourcepub fn new(manifest: ModelManifest) -> Self
pub fn new(manifest: ModelManifest) -> Self
Create a new model update command
Sourcepub fn with_targets(self, nodes: Vec<String>) -> Self
pub fn with_targets(self, nodes: Vec<String>) -> Self
Target specific nodes
Sourcepub fn with_priority(self, priority: u8) -> Self
pub fn with_priority(self, priority: u8) -> Self
Set priority (1 = highest, 5 = lowest)
Sourcepub fn with_rollback(self, model_id: impl Into<String>) -> Self
pub fn with_rollback(self, model_id: impl Into<String>) -> Self
Set rollback model
Sourcepub fn without_auto_load(self) -> Self
pub fn without_auto_load(self) -> Self
Disable auto-load after download
Sourcepub fn targets_node(&self, node_id: &str) -> bool
pub fn targets_node(&self, node_id: &str) -> bool
Check if this command targets a specific node
Trait Implementations§
Source§impl Clone for ModelUpdateCommand
impl Clone for ModelUpdateCommand
Source§fn clone(&self) -> ModelUpdateCommand
fn clone(&self) -> ModelUpdateCommand
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 ModelUpdateCommand
impl Debug for ModelUpdateCommand
Source§impl<'de> Deserialize<'de> for ModelUpdateCommand
impl<'de> Deserialize<'de> for ModelUpdateCommand
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 ModelUpdateCommand
impl RefUnwindSafe for ModelUpdateCommand
impl Send for ModelUpdateCommand
impl Sync for ModelUpdateCommand
impl Unpin for ModelUpdateCommand
impl UnsafeUnpin for ModelUpdateCommand
impl UnwindSafe for ModelUpdateCommand
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