The intent bridge's sources off one bundle.
(bundle: &EntryBundle)
| 94 | |
| 95 | /// The intent bridge's sources off one bundle. |
| 96 | fn intent_sources(bundle: &EntryBundle) -> crate::commands::intent::bridge::AttestationSources { |
| 97 | use crate::commands::intent::bridge::{ |
| 98 | AttestationSources, SidecarArtifact, TrackedAttestation, |
| 99 | }; |
| 100 | let attestation = bundle.attestation.as_ref(); |
| 101 | AttestationSources { |
| 102 | tracked: attestation |
| 103 | .and_then(|sources| sources.tracked.as_ref()) |
| 104 | .map(|tracked| TrackedAttestation { |
| 105 | vault_path: tracked.path.clone(), |
| 106 | frontmatter_json: tracked.frontmatter_json.clone(), |
| 107 | content: tracked.content.clone(), |
| 108 | }), |
| 109 | sidecar: attestation |
| 110 | .and_then(|sources| sources.sidecar.as_ref()) |
| 111 | .map(|sidecar| SidecarArtifact { |
| 112 | path: sidecar.path.clone(), |
| 113 | text: sidecar.text.clone(), |
| 114 | }), |
| 115 | } |
| 116 | } |
| 117 | |
| 118 | /// The memory bridge's sources off one bundle. |
| 119 | fn memory_sources(bundle: &EntryBundle) -> crate::commands::memory::bridge::AttestationSources { |
no test coverage detected