How can I implement how a custom rust type is displayed? #527
Answered
by
mattwparas
IllustratedMan-code
asked this question in
Q&A
-
|
After implementing |
Beta Was this translation helpful? Give feedback.
Answered by
mattwparas
Sep 19, 2025
Replies: 1 comment
-
|
You'll have to implement impl Custom for FunctionSignatureMetadata {
fn fmt(&self) -> Option<std::result::Result<String, std::fmt::Error>> {
Some(Ok(format!(
"(FunctionSignatureMetadata #:name {} #:arity {:?} #:const? {})",
self.name, self.arity, self.is_const
)))
}
} |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
IllustratedMan-code
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You'll have to implement
Customyourself and implement thefmtfunction, instead of using the derive: