pub struct DigestFormatError { /* private fields */ }Expand description
Error returned when a candidate string is not a well-formed digest: exactly 64 lowercase ASCII hex characters (a hex-encoded SHA-256 digest).
Returned by both ConfigFingerprint and ToolDigest’s TryFrom<String> impl, which
their #[serde(try_from = "String")] Deserialize routes every deserialization through —
mirroring crate::ServerId/crate::ToolName’s validated-newtype pattern (see their own
doc comments): no separate, unvalidated deserialization path exists for either type, so a
hand-edited _meta.json cannot produce a value violating as_str’s documented
“64-character lowercase-hex” contract.
§Examples
use mcp_execution_core::provenance::{ConfigFingerprint, DigestFormatError};
let err = ConfigFingerprint::try_from("not-a-digest".to_string()).unwrap_err();
assert!(matches!(err, DigestFormatError { .. }));Trait Implementations§
Source§impl Clone for DigestFormatError
impl Clone for DigestFormatError
Source§fn clone(&self) -> DigestFormatError
fn clone(&self) -> DigestFormatError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DigestFormatError
impl Debug for DigestFormatError
Source§impl Display for DigestFormatError
impl Display for DigestFormatError
impl Eq for DigestFormatError
Source§impl Error for DigestFormatError
impl Error for DigestFormatError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl PartialEq for DigestFormatError
impl PartialEq for DigestFormatError
impl StructuralPartialEq for DigestFormatError
Auto Trait Implementations§
impl Freeze for DigestFormatError
impl RefUnwindSafe for DigestFormatError
impl Send for DigestFormatError
impl Sync for DigestFormatError
impl Unpin for DigestFormatError
impl UnsafeUnpin for DigestFormatError
impl UnwindSafe for DigestFormatError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more