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
Rust has excellent support for converting between data types with the Into, From, TryFrom, and TryInto traits. We could leverage these traits to allow users to register conversions between message types. We could support implicit conversion for any output type that supports Into<T> for its target input.
We could also support implicit conversion when TryInto is available, but this might be an opt-in setting that the user toggles at the diagram level or inside the specific node where the implicit conversion should be allowed. Just like implicit deserialization, an implicit TryInto would direct errors towards the on_implicit_error target.
We should also automatically support implicit conversions from smaller primitives to larger primitives where there is no risk of overflow or loss of precision, e.g. i8 -> i16 -> i32 -> i64, or less obviously u8 -> i16, u16 -> i32.
The text was updated successfully, but these errors were encountered:
Rust has excellent support for converting between data types with the
Into
,From
,TryFrom
, andTryInto
traits. We could leverage these traits to allow users to register conversions between message types. We could support implicit conversion for any output type that supportsInto<T>
for its target input.We could also support implicit conversion when
TryInto
is available, but this might be an opt-in setting that the user toggles at the diagram level or inside the specific node where the implicit conversion should be allowed. Just like implicit deserialization, an implicitTryInto
would direct errors towards theon_implicit_error
target.We should also automatically support implicit conversions from smaller primitives to larger primitives where there is no risk of overflow or loss of precision, e.g.
i8
-> i16-> i32
->i64
, or less obviouslyu8
->i16
,u16
->i32
.The text was updated successfully, but these errors were encountered: