encoder: use shortened defimpl