Trait icu_provider::DryDataProvider

source ·
pub trait DryDataProvider<M: DataMarker>: DataProvider<M> {
    // Required method
    fn dry_load(
        &self,
        req: DataRequest<'_>,
    ) -> Result<DataResponseMetadata, DataError>;
}
Expand description

A 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( &self, req: DataRequest<'_>, ) -> Result<DataResponseMetadata, DataError>

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

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

Implementors§

source§

impl DryDataProvider<HelloWorldV1Marker> for HelloWorldProvider

source§

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