class _JSONableRepeaterWrapper(Generic[
Since a Scheduler can only contain work of a given type, which must have a 0-argument, None-returning signature, and JSONRegistry serializes the schedulers it creates or loads by enumerating the ScheduledCalls stored in their priority queues, this is a wrapper with a special method registered with all JSONRegistrys automatically, to provide a JSON-serialization format for a repeated call with the repeat-call signature (i.e., (steps, stopper) -> None, rather than () -> None).
| See Also | |
fritter.repeat |
| Class Method | from |
Deserialize a _JSONableRepeaterWrapper from a JSON-dumpable dict previously produced by _JSONableRepeaterWrapper.toJSON. |
| Class Method | type |
Return a unique type code ("fritter:repetition") for this wrapper. |
| Method | repeat |
This repeat method is what is actually serialized, using the bound-method support in JSONRegistry. Internally, it is implicitly decorated with each registry's JSONRegistry.method decorator. |
| Method | to |
Serialize this _JSONableRepeaterWrapper to a JSON-dumpable dict suitable for deserialization with _JSONableRepeaterWrapper.fromJSON, including its time, IANA timezone identifier, rule function, and underlying repeating callable. |
| Instance Variable | json |
The specific JSONRegistry to which this repeater-wrapper is bound. |
| Instance Variable | repeater |
The JSONable repeating call that can itself be serialized. |
def fromJSON(cls, load:
LoadProcess[ BootstrapT], json: JSONObject) -> _JSONableRepeaterWrapper[ BootstrapT, StepsT]:
(source)
¶
Deserialize a _JSONableRepeaterWrapper from a JSON-dumpable dict previously produced by _JSONableRepeaterWrapper.toJSON.
This repeat method is what is actually serialized, using the bound-method support in JSONRegistry. Internally, it is implicitly decorated with each registry's JSONRegistry.method decorator.
Serialize this _JSONableRepeaterWrapper to a JSON-dumpable dict suitable for deserialization with _JSONableRepeaterWrapper.fromJSON, including its time, IANA timezone identifier, rule function, and underlying repeating callable.