of static method
The codec in library, or null when it has none.
Implementation
static DVNativeCodec? of(ffi.DynamicLibrary library) {
if (!library.providesSymbol('aw_codec_encode') || !library.providesSymbol('aw_codec_decode')) {
return null;
}
return DVNativeCodec._(
library.lookupFunction<_EncodeN, _EncodeD>('aw_codec_encode', isLeaf: true),
library.lookupFunction<_DecodeN, _DecodeD>('aw_codec_decode', isLeaf: true),
);
}