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

Method write_mechanisms

crates/openshell-prover/src/registry.rs:136–151  ·  view source on GitHub ↗

Short mechanisms by which this binary can write.

(&self)

Source from the content-addressed store, hash-verified

134
135 /// Short mechanisms by which this binary can write.
136 pub fn write_mechanisms(&self) -> Vec<String> {
137 let mut mechanisms = Vec::new();
138 for p in &self.protocols {
139 if p.can_write() {
140 for a in &p.actions {
141 if matches!(a.action_type, ActionType::Write | ActionType::Destructive) {
142 mechanisms.push(format!("{}: {}", p.name, a.name));
143 }
144 }
145 }
146 }
147 if self.can_construct_http {
148 mechanisms.push("arbitrary HTTP request construction".to_owned());
149 }
150 mechanisms
151 }
152}
153
154/// Registry of binary capability descriptors.

Callers

nothing calls this directly

Calls 2

can_writeMethod · 0.80
pushMethod · 0.80

Tested by

no test coverage detected