Trait icu_provider::DynamicDryDataProvider

source ·
pub trait DynamicDryDataProvider<M: DynamicDataMarker>: DynamicDataProvider<M> {
    // Required method
    fn dry_load_data(
        &self,
        marker: DataMarkerInfo,
        req: DataRequest<'_>,
    ) -> Result<DataResponseMetadata, DataError>;
}
Expand description

A dynanmic data provider that can determine whether it can load a particular data identifier, potentially cheaper than actually performing the load.

Required Methods§

source

fn dry_load_data( &self, marker: DataMarkerInfo, req: DataRequest<'_>, ) -> Result<DataResponseMetadata, DataError>

This method goes through the motions of load_data, but only returns the metadata.

If dry_load_data returns an error, load_data must return the same error, but not vice-versa. Concretely, load_data could return deserialization or I/O errors that dry_load_data cannot predict.

Implementors§

source§

impl<P, M> DynamicDryDataProvider<M> for DeserializingBufferProvider<'_, P>
where M: DynamicDataMarker, P: DynamicDryDataProvider<BufferMarker> + ?Sized, for<'de> YokeTraitHack<<M::DataStruct as Yokeable<'de>>::Output>: Deserialize<'de>,