code: func encodingDefinition() (*design.EncodingDefinition, bool) {
  	e, ok := dslengine.CurrentDefinition().(*design.EncodingDefinition)
  	if !ok {
  		dslengine.IncompatibleDSL()
  	}
  	return e, ok
  }
docs: // encodingDefinition returns true and current context if it is an EncodingDefinition,
  // nil and false otherwise.