MCPcopy Create free account
hub / github.com/ElementsProject/lightning / fmt

Method fmt

plugins/lsps-plugin/src/core/lsps2/handler.rs:599–614  ·  view source on GitHub ↗
(&self, f: &mut fmt::Formatter<'_>)

Source from the content-addressed store, hash-verified

597
598impl fmt::Display for DsError {
599 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
600 match self {
601 DsError::NotFound { key } => write!(f, "no datastore entry for key {:?}", key),
602 DsError::MissingValue { key } => write!(
603 f,
604 "datastore entry had neither `string` nor `hex` for key {:?}",
605 key
606 ),
607 DsError::JsonParse { key, source } => {
608 write!(f, "failed to parse JSON at key {:?}: {}", key, source)
609 }
610 DsError::HexDecode { key, source } => {
611 write!(f, "failed to decode hex at key {:?}: {}", key, source)
612 }
613 }
614 }
615}
616
617impl std::error::Error for DsError {}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected