code: func Trait(name string, val ...func()) {
  	if a, ok := apiDefinition(); ok {
  		if len(val) < 1 {
  			dslengine.ReportError("missing trait DSL for %s", name)
  			return
  		} else if len(val) > 1 {
  			dslengine.ReportError("too many arguments given to Trait")
  			return
  		}
  		if _, ok := design.Design.Traits[name]; ok {
  			dslengine.ReportError("multiple definitions for trait %s%s", name, design.Design.Context())
  			return
  		}
  		trait := &dslengine.TraitDefinition{Name: name, DSLFunc: val[0]}
  		if a.Traits == nil {
  			a.Traits = make(map[string]*dslengine.TraitDefinition)
  		}
  		a.Traits[name] = trait
  	}
  }
docs: // Trait can be used in: API
  //
  // Trait defines an API trait. A trait encapsulates arbitrary DSL that gets executed wherever the
  // trait is called via the UseTrait function.