MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / build_capabilities_response

Function build_capabilities_response

crates/openshell-core/src/driver_utils.rs:103–113  ·  view source on GitHub ↗

Build a [`GetCapabilitiesResponse`] from the common driver capability fields. Every compute driver constructs this response with the same fields. Shared here to avoid repeating the struct literal in each driver crate.

(
    driver_name: &str,
    driver_version: impl Into<String>,
    default_image: impl Into<String>,
)

Source from the content-addressed store, hash-verified

101/// Every compute driver constructs this response with the same fields. Shared
102/// here to avoid repeating the struct literal in each driver crate.
103pub fn build_capabilities_response(
104 driver_name: &str,
105 driver_version: impl Into<String>,
106 default_image: impl Into<String>,
107) -> GetCapabilitiesResponse {
108 GetCapabilitiesResponse {
109 driver_name: driver_name.to_string(),
110 driver_version: driver_version.into(),
111 default_image: default_image.into(),
112 }
113}
114
115/// Return the effective log level for a sandbox.
116///

Callers 3

capabilitiesMethod · 0.85
capabilitiesMethod · 0.85
capabilitiesMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected