[][src]Module agnes::partial

Framework for partial function handling (where some functionality is implemented for some but not all of the data types of fields in a data structure).

A specific piece of partially-implemented functionality consists of a Func implementation for all data types where the functionality exists, a FuncDefault implementation for data types where the functionality doesn't exist, and IsImplemented specification for all data types denoting whether to use the available Func or the fall-back FuncDefault.

This module should be unnecessary once trait specialization is finalized.

Structs

Capabilities

Marker struct for combination of a data type, Func, and whether or not that combination has an implementation.

Implemented

Marker struct denoting that a Func is implemented for a particular data type.

StorageCapabilities

Structure tracking a field (as accessed through a type that implements DataIndex) along with its Capabilities details.

Unimplemented

Marker struct denoting that a Func is not implemented for a particular data type.

Traits

DeriveCapabilities

Trait that augments a DataIndexCons (a cons-list of field access structs) with partial-function capability information as specified by IsImplemented definitions.

Func

Implementation of a function for a particular data type.

FuncDefault

Default function implementation with no valid implementation exists.

IsImplemented

Trait denoting whether a particular Func is implemented for a data type.

PartialMap

Trait for applying a partially-implemented function Func to a cons-list.

Type Definitions

DeriveCapabilitiesOf

Helper type alias that provides the derived capabilities of the DataIndexCons associated with a particular Labels / Frames pair.

StorageCapabilitiesCons

A cons-list of StorageCapabilities structs.