CanonicalDecomposition constructor

CanonicalDecomposition(
  1. DataProvider provider
)

Construct a new CanonicalDecomposition instance for NFC

See the Rust documentation for new for more information.

Throws DataError on failure.

Implementation

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