CanonicalComposition constructor

CanonicalComposition(
  1. DataProvider provider
)

Construct a new CanonicalComposition instance for NFC

See the Rust documentation for new for more information.

Throws DataError on failure.

Implementation

factory CanonicalComposition(DataProvider provider) {
  final result = _icu4x_CanonicalComposition_create_mv1(provider._ffi);
  if (!result.isOk) {
    throw DataError.values[result.union.err];
  }
  return CanonicalComposition._fromFfi(result.union.ok, []);
}