[][src]Trait type_record::Mapping

pub trait Mapping {
    type To;
    type Arguments;
    pub fn create<X>(arguments: &Self::Arguments) -> Self::To;
}

A mapping from a type to another type, with a function for creation.

Associated Types

type To[src]

This type function controls what the record types are.

If this is type To<X> = Vec<X>, then the record will consist of vectors of the component types.

type Arguments[src]

The arguments provided to the create function.

Loading content...

Required methods

pub fn create<X>(arguments: &Self::Arguments) -> Self::To[src]

This function creates something of To<X> given the arguments. In a record, this would be called for each component type.

Loading content...

Implementors

impl Mapping for _EmptyMapping[src]

type To = ()

type Arguments = ()

Loading content...