Module icu_provider_adapters::filter

source ·
Expand description

Providers that filter resource requests.

Requests that fail a filter test will return [DataError] of kind Filtered and will not appear in [IterableDynamicDataProvider] iterators.

§Examples

use icu_locale::subtags::language;
use icu_provider::hello_world::*;
use icu_provider::prelude::*;
use icu_provider_adapters::filter::FilterDataProvider;

// Only return German data from a HelloWorldProvider:
FilterDataProvider::new(HelloWorldProvider, "Demo German-only filter")
    .with_filter(|id| id.locale.language == language!("de"));

Structs§