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

Method from

crates/openshell-core/src/policy.rs:124–138  ·  view source on GitHub ↗
(proto: ProtoFilesystemPolicy)

Source from the content-addressed store, hash-verified

122
123impl From<ProtoFilesystemPolicy> for FilesystemPolicy {
124 fn from(proto: ProtoFilesystemPolicy) -> Self {
125 Self {
126 read_only: proto
127 .read_only
128 .into_iter()
129 .map(|p| PathBuf::from(normalize_path(&p)))
130 .collect(),
131 read_write: proto
132 .read_write
133 .into_iter()
134 .map(|p| PathBuf::from(normalize_path(&p)))
135 .collect(),
136 include_workdir: proto.include_workdir,
137 }
138 }
139}
140
141impl From<ProtoLandlockPolicy> for LandlockPolicy {

Callers

nothing calls this directly

Calls 2

normalize_pathFunction · 0.70
is_emptyMethod · 0.45

Tested by

no test coverage detected