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