mirror of
https://github.com/salsa-rs/salsa.git
synced 2025-01-16 01:56:15 +00:00
17 lines
351 B
Rust
17 lines
351 B
Rust
|
#[salsa::jar(db = Db)]
|
||
|
struct Jar(AccTwoUnnamedFields, AccNamedField);
|
||
|
|
||
|
trait Db: salsa::DbWithJar<Jar> {}
|
||
|
|
||
|
// accumulator with more than one unnamed fields
|
||
|
#[salsa::accumulator(jar = Jar)]
|
||
|
struct AccTwoUnnamedFields (u32, u32);
|
||
|
|
||
|
|
||
|
// accumulator with named fields
|
||
|
#[salsa::accumulator(jar = Jar)]
|
||
|
struct AccNamedField {
|
||
|
field: u32,
|
||
|
}
|
||
|
|
||
|
fn main() {}
|