forked from goodboy/tractor
1
0
Fork 0

Make `.msg.types.Msg.pld: Raw` only, since `PldRx`..

runtime_to_msgspec
Tyler Goodlet 2024-04-26 13:18:06 -04:00
parent 61db040702
commit d285a3479a
1 changed files with 3 additions and 2 deletions

View File

@ -56,6 +56,7 @@ log = get_logger('tractor.msgspec')
PayloadT = TypeVar('PayloadT') PayloadT = TypeVar('PayloadT')
# TODO: PayloadMsg
class Msg( class Msg(
Struct, Struct,
Generic[PayloadT], Generic[PayloadT],
@ -81,7 +82,7 @@ class Msg(
tree. tree.
''' '''
cid: str|None # call/context-id cid: str # call/context-id
# ^-TODO-^: more explicit type? # ^-TODO-^: more explicit type?
# -[ ] use UNSET here? # -[ ] use UNSET here?
# https://jcristharif.com/msgspec/supported-types.html#unset # https://jcristharif.com/msgspec/supported-types.html#unset
@ -106,7 +107,7 @@ class Msg(
# TODO: could also be set to `msgspec.Raw` if the sub-decoders # TODO: could also be set to `msgspec.Raw` if the sub-decoders
# approach is preferred over the generic parameterization # approach is preferred over the generic parameterization
# approach as take by `mk_msg_spec()` below. # approach as take by `mk_msg_spec()` below.
pld: PayloadT|Raw pld: Raw
class Aid( class Aid(