You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With the following set of structs, the goal is to get the u64 in E::Value to serialize in hex format. The only place where the #[annotate(format = hex)] attribute seems to accomplish this is when it's attached to myB in C.
#[derive(Annotate, Serialize)]
#[serde(untagged)]
pub enum E {
// We want this u64 to serialize in hex format.
Value(u64),
}
#[derive(Annotate, Serialize)]
pub struct A {
myEnum: E,
}
#[derive(Annotate, Serialize)]
pub struct B {
myA: Option<Vec<A>>,
}
#[derive(Annotate, Serialize)]
pub struct C {
#[annotate(format = hex)]
myB: Vec<B>,
}
The text was updated successfully, but these errors were encountered:
With the following set of structs, the goal is to get the u64 in
E::Value
to serialize in hex format. The only place where the#[annotate(format = hex)]
attribute seems to accomplish this is when it's attached tomyB
inC
.The text was updated successfully, but these errors were encountered: