futureverse / marshal

[PROTOTYPE] R package: marshal - Framework to Marshal Objects to be Used in Another R Processes
https://marshal.futureverse.org/
Other
15 stars 1 forks source link

Add can_be_marshalled() #2

Closed HenrikBengtsson closed 1 year ago

HenrikBengtsson commented 2 years ago

Add a function, can_be_marshalled(), that can be used to test if an object can be marshalled or not.

HenrikBengtsson commented 1 year ago

I can image that can_be_marshalled() could return:

The "maybe" is for cases where it's computationally expensive to find out whether an object can be marshalled. For instance, it might require walking a deeply nested structure that may contain a non-marshalable element. can_be_marshalled() could have a argument for doing a deep scan, e.g. can_be_marshalled(x, full = TRUE).

HenrikBengtsson commented 1 year ago

Added marshallable(). Will punt of optional methods/arguments for trying to resolve an NA result.