MCPcopy Create free account
hub / github.com/clockworklabs/SpacetimeDB / source_chain

Function source_chain

crates/commitlog/src/error.rs:77–88  ·  view source on GitHub ↗

Recursively concatenate `e.source()`, separated by ": ".

(e: &impl std::error::Error)

Source from the content-addressed store, hash-verified

75
76/// Recursively concatenate `e.source()`, separated by ": ".
77pub(crate) fn source_chain(e: &impl std::error::Error) -> String {
78 let mut s = String::new();
79 let mut source = e.source();
80 while let Some(cause) = source {
81 s.push(':');
82 s.push(' ');
83 s.push_str(&cause.to_string());
84 source = cause.source()
85 }
86
87 s
88}

Callers

nothing calls this directly

Calls 4

newFunction · 0.50
sourceMethod · 0.45
pushMethod · 0.45
to_stringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…