ICU4X
International Components for Unicode
Loading...
Searching...
No Matches
icu4x::DataProvider Class Reference

#include <DataProvider.d.hpp>

Public Member Functions

diplomat::result< std::monostate, icu4x::DataErrorfork_by_marker (icu4x::DataProvider &other)
 
diplomat::result< std::monostate, icu4x::DataErrorfork_by_locale (icu4x::DataProvider &other)
 
diplomat::result< std::monostate, icu4x::DataErrorenable_locale_fallback_with (const icu4x::LocaleFallbacker &fallbacker)
 

Static Public Member Functions

static diplomat::result< std::unique_ptr< icu4x::DataProvider >, icu4x::DataErrorfrom_fs (std::string_view path)
 
static diplomat::result< std::unique_ptr< icu4x::DataProvider >, icu4x::DataErrorfrom_byte_slice (diplomat::span< const uint8_t > blob)
 
static void operator delete (void *ptr)
 

Detailed Description

An ICU4X data provider, capable of loading ICU4X data keys from some source.

Currently the only source supported is loading from "blob" formatted data from a bytes buffer or the file system.

If you wish to use ICU4X's builtin "compiled data", use the version of the constructors that do not have _with_provider in their names.

See the Rust documentation for icu_provider for more information.

Member Function Documentation

◆ enable_locale_fallback_with()

diplomat::result< std::monostate, icu4x::DataError > icu4x::DataProvider::enable_locale_fallback_with ( const icu4x::LocaleFallbacker & fallbacker)
inline

See the Rust documentation for new for more information.

Additional information: 1

◆ fork_by_locale()

diplomat::result< std::monostate, icu4x::DataError > icu4x::DataProvider::fork_by_locale ( icu4x::DataProvider & other)
inline

Same as fork_by_key but forks by locale instead of key.

See the Rust documentation for IdentifierNotFoundPredicate for more information.

◆ fork_by_marker()

diplomat::result< std::monostate, icu4x::DataError > icu4x::DataProvider::fork_by_marker ( icu4x::DataProvider & other)
inline

Creates a provider that tries the current provider and then, if the current provider doesn't support the data key, another provider other.

This takes ownership of the other provider, leaving an empty provider in its place.

See the Rust documentation for ForkByMarkerProvider for more information.

◆ from_byte_slice()

diplomat::result< std::unique_ptr< icu4x::DataProvider >, icu4x::DataError > icu4x::DataProvider::from_byte_slice ( diplomat::span< const uint8_t > blob)
inlinestatic

Constructs a BlobDataProvider and returns it as an DataProvider.

See the Rust documentation for try_new_from_static_blob for more information.

◆ from_fs()

diplomat::result< std::unique_ptr< icu4x::DataProvider >, icu4x::DataError > icu4x::DataProvider::from_fs ( std::string_view path)
inlinestatic

Constructs an FsDataProvider and returns it as an DataProvider. Requires the provider_fs Cargo feature. Not supported in WASM.

See the Rust documentation for FsDataProvider for more information.

◆ operator delete()

void icu4x::DataProvider::operator delete ( void * ptr)
inlinestatic

The documentation for this class was generated from the following files: