chainlet.primitives.linker module

class chainlet.primitives.linker.LinkPrimitives

Bases: object

Primitives used in a linker domain

Warning:This is an internal, WIP helper. Names, APIs and signatures are subject to change.
classmethod add_converter(converter)

Add a converter to this Converter type and all its children

Each converter is a callable with the signature

converter(element: object) → :py:class:`ChainLink`

and must create a ChainLink for any valid element input. For any element that is not valid input, NotImplemented must be returned.

base_bundle_type = None

the basic bundle type holding groups of concurrent chainlinks

base_chain_type = None

the basic chain type holding sequences of chainlinks

the basic chainlink type from which all primitives of this domain derive

convert(element)

Convert an element to a chainlink

converters
flat_chain_type = None

the flat chain type holding sequences of simple chainlinks

a neutral link that does not change a chain

supersedes(other)