Macro icu_provider::impl_casting_upcast

source ·
macro_rules! impl_casting_upcast {
    ($dyn_m:path, [ $($struct_m:ident),+, ]) => { ... };
}
Expand description

Implements UpcastDataPayload from several data markers to a single data marker that all share the same DataMarker::Yokeable.

§Examples

use icu_provider::prelude::*;
use std::borrow::Cow;

#[icu_provider::data_struct(
    FooV1Marker,
    BarV1Marker = "demo/bar@1",
    BazV1Marker = "demo/baz@1"
)]
pub struct FooV1<'data> {
    message: Cow<'data, str>,
};

icu_provider::impl_casting_upcast!(
    FooV1Marker,
    [BarV1Marker, BazV1Marker,]
);