The pointer's repository as the contract names it.
(pointer: &RemoteSandboxPointer)
| 84 | |
| 85 | /// The pointer's repository as the contract names it. |
| 86 | pub fn reference(pointer: &RemoteSandboxPointer) -> Result<pb::RepositoryRef, String> { |
| 87 | Ok(pb::RepositoryRef { |
| 88 | authority: pointer.repository.authority.clone(), |
| 89 | repository_id: data_encoding::HEXLOWER_PERMISSIVE |
| 90 | .decode(pointer.repository.repository_id.as_bytes()) |
| 91 | .map_err(|e| format!("the sandbox pointer's repository_id is not hex: {e}"))?, |
| 92 | workspace_id: None, |
| 93 | }) |
| 94 | } |
| 95 | |
| 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. |