-
-
Couldn't load subscription status.
- Fork 52
Open
Description
Hi!
I have a couple of types like Identifier which are serialized to/from a string, but internally store things different.
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "specta", derive(specta::Type))]
#[serde(try_from = "&str", into = "String")]
pub struct Identifier {
parts: Vec<Alphanum>,
}
impl Display for Identifier {
/* implementation */
}
impl FromStr for Identifier {
/* implementation */
}The generated binding for this is:
export type Identifier = { parts: Alphanum[] }But it should be
export type Identifier = string;I'd be perfectly content with a workaround, such as forcing a specific type:
#[specta(type = "String")]
But I'm not aware anything like that exists.
I'm using 2.0.0-rc.22
Metadata
Metadata
Assignees
Labels
No labels