Trait icu_provider::export::DataExporter[][src]

pub trait DataExporter<'s, T: ?Sized> where
    T: 's + ToOwned,
    <T as ToOwned>::Owned: Debug
{ fn put_payload(
        &mut self,
        req: &DataRequest,
        payload: &T
    ) -> Result<(), Box<dyn Error>>;
fn include_resource_options(&self, resc_options: &ResourceOptions) -> bool; fn put_key_from_provider<'d>(
        &mut self,
        resc_key: &ResourceKey,
        provider: &impl IterableDataProvider<'d, T>
    ) -> Result<(), Error>
    where
        's: 'd
, { ... } }

An object capable of serializing data payloads to be read by a DataProvider.

A DataProvider by itself is “read-only”; this trait enables it to be “read-write”.

Required methods

fn put_payload(
    &mut self,
    req: &DataRequest,
    payload: &T
) -> Result<(), Box<dyn Error>>
[src]

Save a payload corresponding to the given data request (resource path).

fn include_resource_options(&self, resc_options: &ResourceOptions) -> bool[src]

Whether to load and dump data for the given entry. This function enables the DataExporter to filter out certain data entries.

Loading content...

Provided methods

fn put_key_from_provider<'d>(
    &mut self,
    resc_key: &ResourceKey,
    provider: &impl IterableDataProvider<'d, T>
) -> Result<(), Error> where
    's: 'd, 
[src]

Auto-implemented function that loads data from an IterableDataProvider and dumps it into this DataExporter.

Loading content...

Implementors

impl DataExporter<'_, dyn ErasedDataStruct + 'static> for HelloWorldProvider<'static>[src]

Adds entries to a HelloWorldProvider from ErasedDataStruct

Loading content...