1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
macro_rules! common { ( $(#[doc = $doc:expr])+ struct $name:ident { $(#[doc = $field_doc:literal] $field:ident: $type:ty,)+ } ) => { $(#[doc = $doc])+ #[derive(Debug, Clone)] // todo: #[non_exhaustive] pub struct $name<C> { /// A bot for calling API without information inference. pub bot: std::sync::Arc<crate::Bot<C>>, $(#[doc = $field_doc] pub $field: $type,)+ } impl<C> crate::internal::Sealed for $name<C> { } } }