MCPcopy Create free account
hub / github.com/ChrisFeldmeier/OpenCodeRust / new

Method new

crates/opencode-tool/src/tool.rs:222–229  ·  view source on GitHub ↗
(permission: impl Into<String>)

Source from the content-addressed store, hash-verified

220
221impl PermissionRequest {
222 pub fn new(permission: impl Into<String>) -> Self {
223 Self {
224 permission: permission.into(),
225 patterns: Vec::new(),
226 metadata: HashMap::new(),
227 always: Vec::new(),
228 }
229 }
230
231 pub fn with_pattern(mut self, pattern: impl Into<String>) -> Self {
232 self.patterns.push(pattern.into());

Callers

nothing calls this directly

Calls 2

newFunction · 0.85
cloneMethod · 0.45

Tested by

no test coverage detected