MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / target

Function target

atomic-cli/src/remote_sandbox.rs:98–111  ·  view source on GitHub ↗

The view the pointer names, sent as every request's target: a token for another view is refused rather than quietly serving that view.

(pointer: &RemoteSandboxPointer)

Source from the content-addressed store, hash-verified

96/// The view the pointer names, sent as every request's target: a token for
97/// another view is refused rather than quietly serving that view.
98pub fn target(pointer: &RemoteSandboxPointer) -> pb::ViewRef {
99 pb::ViewRef {
100 view_id: pointer
101 .view_id
102 .as_deref()
103 .and_then(|id| {
104 data_encoding::HEXLOWER_PERMISSIVE
105 .decode(id.as_bytes())
106 .ok()
107 })
108 .unwrap_or_default(),
109 name: Some(pointer.view.clone()),
110 }
111}
112
113/// The pointer form of an OpenSandbox reply.
114pub fn pointer_from(opened: &pb::SandboxOpened) -> CliResult<RemoteSandboxPointer> {

Callers 3

exchangeFunction · 0.70
materializeFunction · 0.70

Calls 4

okMethod · 0.45
decodeMethod · 0.45
as_bytesMethod · 0.45
cloneMethod · 0.45