Crate icu_data

source ·
Expand description

Initializers for ICU data files.

Use the library by instantiating a Loader and keeping a reference to it for as long as you need access to timezone data. You can do this in your program as many times as needed, and the loader will make sure that the data is loaded before it is first used, and that it is unloaded once no more loaders are live.

It is also possible to clone a loader in case you need to pass it along to ensure that timezone data is available.

Example use:

fn basic() {
    let _loader = Loader::new().expect("loader is constructed with success");
    let _loader2 = Loader::new().expect("second initialization is a no-operation");
    let _loader3 = _loader2.clone();  // It is OK to clone a loader and keep it around.


  • Manages the lifecycle of the loaded ICU data.


  • Error type returned by icu_udata. The individual enum values encode classes of possible errors returned.