1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
macro_rules! common {
(
$(#[doc = $doc:expr])+
struct $name:ident {
$(#[doc = $field_doc:literal] $field:ident: $type:ty,)+
}
) => {
$(#[doc = $doc])+
#[derive(Debug, Clone)]
#[non_exhaustive]
pub struct $name<C> {
pub bot: std::sync::Arc<crate::Bot<C>>,
$(#[doc = $field_doc] pub $field: $type,)+
}
impl<C> crate::internal::Sealed for $name<C> { }
impl<C> crate::contexts::fields::Context<C> for $name<C> {
fn bot(&self) -> &crate::Bot<C> {
&self.bot
}
}
}
}