// LookupEncoder yields an ipld.Encoder function matching a multicodec indicator code number.
//
// Multicodec indicator numbers are specified in
// https://github.com/multiformats/multicodec/blob/master/table.csv
//
// To be available from this lookup function, an encoder must have been registered
// for this indicator number by an earlier call to the RegisterEncoder function.
LookupEncoder yields an ipld.Encoder function matching a multicodec indicator code number.



To be available from this lookup function, an encoder must have been registered
for this indicator number by an earlier call to the RegisterEncoder function.
// LookupEncoder yields an ipld . Encoder function matching a multicodec indicator code number . // // Multicodec indicator numbers are specified in // https : // github . com / multiformats / multicodec / blob / master / table . csv // // To be available from this lookup function an encoder must have been registered // for this indicator number by an earlier call to the RegisterEncoder function .
func LookupEncoder(indicator uint64) (ipld.Encoder, error) {
	encodeFunc, exists := encoderRegistry[indicator]
	if !exists {
		return nil, fmt.Errorf("no encoder registered for multicodec code %d (0x%x)", indicator, indicator)
	}
	return encodeFunc, nil
}
func LookupEncoder ( indicator uint64 ) ( ipld . Encoder , error ) { encodeFunc , exists := encoderRegistry [ indicator ] if ! exists { return nil , fmt . Errorf ( " " , indicator , indicator ) } return encodeFunc , nil }
LookupEncoder yields an ipld.Encoder function matching a multicodec indicator code number.
LookupEncoder yields an ipld . Encoder function matching a multicodec indicator code number .