Skip to content

Why are non-scalar fields defaulted to Option<T> ? #679

Answered by LucioFranco
floris-d2x asked this question in Q&A
Discussion options

You must be logged in to vote

This is due to the way that proto3 supports message fields as being optional. Its possible for a field to not be included due to backwards compat. https://github.com/tokio-rs/prost#field-modifiers

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@floris-d2x
Comment options

Answer selected by floris-d2x
Comment options

You must be logged in to vote
2 replies
@floris-d2x
Comment options

@wackazong
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants