class documentation

class _JSONableRepeaterWrapper(Generic[BootstrapT, StepsT]): (source)

View In Hierarchy

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 fromJSON Deserialize a _JSONableRepeaterWrapper from a JSON-dumpable dict previously produced by _JSONableRepeaterWrapper.toJSON.
Class Method typeCodeForJSON 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 toJSON 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 jsonRegistry The specific JSONRegistry to which this repeater-wrapper is bound.
Instance Variable repeater The JSONable repeating call that can itself be serialized.

Deserialize a _JSONableRepeaterWrapper from a JSON-dumpable dict previously produced by _JSONableRepeaterWrapper.toJSON.

@classmethod
def typeCodeForJSON(cls) -> str: (source)

Return a unique type code ("fritter:repetition") for this wrapper.

@_universal.method
def repeat(self): (source)

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.

def toJSON(self, registry: JSONRegistry[object]) -> JSONObject: (source)

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.

The specific JSONRegistry to which this repeater-wrapper is bound.

The JSONable repeating call that can itself be serialized.