hermes_protobuf_encoding_components/
macros.rs

1#[macro_export]
2macro_rules! impl_type_url {
3    ($component:ident, $type_url:literal $(,)?) => {
4        pub struct $component;
5
6        impl<Encoding, Value> $crate::vendor::SchemaGetter<Encoding, Value> for $component
7        where
8            Encoding: $crate::vendor::HasSchemaType<Schema = &'static str>,
9        {
10            fn schema(
11                _encoding: &Encoding,
12                _phantom: core::marker::PhantomData<Value>,
13            ) -> &&'static str {
14                &$type_url
15            }
16        }
17    };
18}