Skip to main content

impl_string_index

Macro impl_string_index 

Source
macro_rules! impl_string_index {
    ($wrapper:ty: $inner:ty) => { ... };
    ($wrapper:ty: $inner:ty, $($rest:tt)*) => { ... };
    ($($ty:ty),+ $(,)?) => { ... };
}
Expand description

Implements StringIndex for one or more types.

ยงExamples

For wrapper types with an inner integer type:

use lite_strtab::impl_string_index;

#[derive(Clone, Copy)]
#[repr(transparent)]
struct ProviderIdx(u16);

impl_string_index!(ProviderIdx: u16);