pub enum DiffOp {
Show 20 variants
AddTag(String),
RemoveTag(String),
AddModel(ModelCapability),
RemoveModel(String),
UpdateModel {
model_id: String,
tokens_per_sec: Option<u32>,
loaded: Option<bool>,
},
AddTool(ToolCapability),
RemoveTool(String),
UpdateHardware(HardwareCapabilities),
UpdateMemory(u32),
UpdateNetwork(u32),
UpdateSoftware(SoftwareCapabilities),
AddRuntime {
name: String,
version: String,
},
RemoveRuntime(String),
AddFramework {
name: String,
version: String,
},
RemoveFramework(String),
UpdateLimits(ResourceLimits),
UpdateMaxConcurrent(u32),
UpdateRateLimit(u32),
SetField {
path: String,
value: Value,
},
UnsetField {
path: String,
},
}Expand description
Individual diff operation
Variants§
AddTag(String)
Add a tag
RemoveTag(String)
Remove a tag
AddModel(ModelCapability)
Add a model capability
RemoveModel(String)
Remove a model by ID
UpdateModel
Update model fields (partial update)
Fields
AddTool(ToolCapability)
Add a tool capability
RemoveTool(String)
Remove a tool by ID
UpdateHardware(HardwareCapabilities)
Update hardware capabilities (full replacement)
UpdateMemory(u32)
Update memory only
UpdateNetwork(u32)
Update network bandwidth only
UpdateSoftware(SoftwareCapabilities)
Update software capabilities (full replacement)
AddRuntime
Add a runtime
RemoveRuntime(String)
Remove a runtime
AddFramework
Add a framework
RemoveFramework(String)
Remove a framework
UpdateLimits(ResourceLimits)
Update resource limits (full replacement)
UpdateMaxConcurrent(u32)
Update max concurrent requests only
UpdateRateLimit(u32)
Update rate limit only
SetField
Set a custom JSON field by path
UnsetField
Unset a custom field
Implementations§
Source§impl DiffOp
impl DiffOp
Sourcepub fn estimated_size(&self) -> usize
pub fn estimated_size(&self) -> usize
Estimate serialized size of this operation in bytes
Sourcepub fn is_model_op(&self) -> bool
pub fn is_model_op(&self) -> bool
Check if this is a model operation
Sourcepub fn is_tool_op(&self) -> bool
pub fn is_tool_op(&self) -> bool
Check if this is a tool operation
Trait Implementations§
Source§impl<'de> Deserialize<'de> for DiffOp
impl<'de> Deserialize<'de> for DiffOp
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<DiffOp, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<DiffOp, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for DiffOp
impl Serialize for DiffOp
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for DiffOp
Auto Trait Implementations§
impl Freeze for DiffOp
impl RefUnwindSafe for DiffOp
impl Send for DiffOp
impl Sync for DiffOp
impl Unpin for DiffOp
impl UnsafeUnpin for DiffOp
impl UnwindSafe for DiffOp
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