Method
fmt
(&self, f: &mut fmt::Formatter<'_>)
Source from the content-addressed store, hash-verified
| 85 | /// Meta mode: `Nat.add@a1b2c3d4`. Anon mode: `a1b2c3d4`. |
| 86 | impl<M: KernelMode> fmt::Display for KId<M> { |
| 87 | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { |
| 88 | let hex = self.addr.hex(); |
| 89 | let short = &hex[..8.min(hex.len())]; |
| 90 | if self.name.has_meta() { |
| 91 | self.name.meta_fmt(f)?; |
| 92 | write!(f, "@{short}") |
| 93 | } else { |
| 94 | write!(f, "{short}") |
| 95 | } |
| 96 | } |
| 97 | } |
| 98 | |
| 99 | #[cfg(test)] |
Callers
nothing calls this directly
Tested by
no test coverage detected