sanity-clause.protocol package

<< back to sanity-clause index

The methods that govern behavior in sanity-clause.

The methods relating to fields are:

The methods relating to schemas are:

Exported symbols:

Generic Functions

dump

[source]

WARNING: This isn't fully tested/supported, but it might work! I reserve the right to change the API in breaking ways, though.

dump takes some data an serializes it to a plist or alist based on format, which can be set to, well, :plist or :alist.

load

[source]

Deserializes data into an instance of schema. Fills in default values and validates fields. If schema is :env, it will try to load from environment variables.

System Message: WARN (Duplicate explicit target name: "[source]"., source line 57)

get-value

[source]

Tries to fetch the value corresponding to the field from some datastructure. field-name is used if no attribute is explicitly set on the field.

System Message: WARN (Duplicate explicit target name: "[source]"., source line 68)

validate

[source]

Run the validation checks for a given field and raise a sanity-clause.field:validation-error if it is invalid.

System Message: WARN (Duplicate explicit target name: "[source]"., source line 79)

serialize

[source]

Converts the value of a field into another representation.

System Message: WARN (Duplicate explicit target name: "[source]"., source line 90)

deserialize

[source]

Converts the value retrieved from the raw data into the datatype the field expects to work with, or fails, raising a sanity-clause.field:conversion-error.

System Message: WARN (Duplicate explicit target name: "[source]"., source line 101)

resolve

[source]

A function that encapsulates getting, corecing, and validating values for a field. Calls get-value, deserialize, and validate.

System Message: WARN (Duplicate explicit target name: "[source]"., source line 112)