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

Method fmt

atomic-repository/src/repository/provenance_gate.rs:198–279  ·  view source on GitHub ↗
(&self, f: &mut std::fmt::Formatter<'_>)

Source from the content-addressed store, hash-verified

196
197impl std::fmt::Display for GateBlocker {
198 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
199 match self {
200 Self::MissingSessionEnvelope { change } => write!(
201 f,
202 "change {change}: no hashed session envelope in metadata"
203 ),
204 Self::TamperedSessionEnvelope { change, reason } => {
205 write!(
206 f,
207 "change {change}: session envelope fails to decode ({reason})"
208 )
209 }
210 Self::MissingProvenanceRoot { change, session } => {
211 write!(
212 f,
213 "change {change}: no provenance root for session {session}"
214 )
215 }
216 Self::MissingSessionLedger { change, session } => {
217 write!(
218 f,
219 "change {change}: no durable session ledger for session {session}"
220 )
221 }
222 Self::SessionIncomplete {
223 change,
224 session,
225 reason,
226 unbound_commits,
227 paths,
228 } => {
229 write!(f, "change {change}: session {session} is INCOMPLETE ({reason})")?;
230 if !unbound_commits.is_empty() {
231 write!(f, "; unbound commits: {}", unbound_commits.join(", "))?;
232 }
233 if !paths.is_empty() {
234 write!(f, "; affected paths: {}", paths.join(", "))?;
235 }
236 Ok(())
237 }
238 Self::MissingAttestation { change, session } => {
239 write!(
240 f,
241 "change {change}: no same-session attestation for session {session}"
242 )
243 }
244 Self::AttestationNotVerifying {
245 change,
246 session,
247 attestation,
248 } => write!(
249 f,
250 "change {change}: attestation {attestation} (session {session}) signature does not verify"
251 ),
252 Self::AttestationUnverifiable {
253 change,
254 session,
255 attestation,

Callers

nothing calls this directly

Calls 1

is_emptyMethod · 0.45

Tested by

no test coverage detected