| Crates.io | ags |
| lib.rs | ags |
| version | 0.1.0 |
| created_at | 2025-08-10 14:12:29.441719+00 |
| updated_at | 2026-01-15 00:28:29.594053+00 |
| description | Anonymous generic struct for rust. |
| homepage | |
| repository | https://github.com/mintlu8/ags |
| max_upload_size | |
| id | 1788938 |
| size | 28,121 |
Anonymous generic struct for rust.
Primarily used for types that are meant to be immediately type erased. For instance:
#[ags::anonymous_generic_struct]
struct CardTemplate {
pub name: impl AsRef<str>,
pub cost: impl CardCost,
pub on_play: impl CardOnPlay,
}
#[ags::anonymous_generic_struct]
impl Card for CardTemplate {
..
}
pub fn create_card() -> Box<dyn Card> {
Box::new(CardTemplate {
..
})
}