Skip to content

Instantly share code, notes, and snippets.

@mitsuhiko mitsuhiko/aha.rs

Created Jun 27, 2018
Embed
What would you like to do?
{
"event_id": "cdbe646b-de0e-4f85-bdc5-2703bc517bdf"
}
->
Event {
id: Annotated {
value: Maybe::Valid(Uuid("cdbe646b-de0e-4f85-bdc5-2703bc517bdf")),
metadata: MetaData { errors: vec![] },
}
}
{
"event_id": 42
}
->
Event {
id: Annotated {
value: Maybe::Invalid(UnexpectedType("integer")),
metadata: MetaData { errors: vec!["unexpected integer"] },
}
}
{
"event_id": 42,
"metadata": {
"event_id": {
"errors": ["some other error"]
}
}
}
->
Event {
id: Annotated {
value: Maybe::Invalid(UnexpectedType("integer")),
metadata: MetaData { errors: vec!["some other error", "unexpected integer"] },
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.