Bases: titus.signature.Signature
PFA function signature for a single pattern.
This class can either be used directly as a function’s only signature or it may be contained within a titus.signature.Sigs.
Parameters: |
|
---|
Determine if this signature accepts the given arguments for a given PFA version number.
Parameters: |
|
---|---|
Return type: | (titus.signature.Sig, list of titus.datatype.AvroType, AvroType) |
Returns: | (self, resolved argument types, resolved return type) if this signature accepts the arguments; None otherwise |
Apply the label assignments (e.g. “A” matched to “int”, “B” matched to “string”, etc.) to each parameter of the signature.
Parameters: |
|
---|---|
Return type: | titus.datatype.AvroType |
Returns: | resolved type for one parameter of the signature |
Apply the label assignments (e.g. “A” matched to “int”, “B” matched to “string” etc.) to the return pattern.
Parameters: |
|
---|---|
Return type: | titus.datatype.AvroType |
Returns: | resolved type for the return value of the signature |
Determine if a single slot in the parameter pattern matches a single argument’s type.
Parameters: |
|
---|---|
Return type: | bool |
Returns: | True if arg matches pat; False otherwise |