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

Method unpack

crates/data-structures/src/error_stream.rs:182–190  ·  view source on GitHub ↗
(&mut self, result: Result<T, ES>)

Source from the content-addressed store, hash-verified

180 #[inline(never)] // don't optimize this too much
181 #[cold]
182 fn unpack<T, ES: Into<ErrorStream<E>>>(&mut self, result: Result<T, ES>) -> Option<T> {
183 match result {
184 Ok(value) => Some(value),
185 Err(error) => {
186 self.0.extend(error.into().0);
187 None
188 }
189 }
190 }
191}
192impl<E: fmt::Display> fmt::Display for ErrorStream<E> {
193 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {

Callers

nothing calls this directly

Calls 1

extendMethod · 0.45

Tested by

no test coverage detected