mirror of
https://github.com/salsa-rs/salsa.git
synced 2025-01-16 10:12:02 +00:00
19 lines
318 B
Rust
19 lines
318 B
Rust
|
#[salsa::jar(db = Db)]
|
||
|
struct Jar(MyInput, tracked_method_on_untracked_impl);
|
||
|
|
||
|
trait Db: salsa::DbWithJar<Jar> {}
|
||
|
|
||
|
#[salsa::input]
|
||
|
struct MyInput {
|
||
|
field: u32,
|
||
|
}
|
||
|
|
||
|
impl MyInput {
|
||
|
#[salsa::tracked]
|
||
|
fn tracked_method_on_untracked_impl(self, db: &dyn Db) -> u32 {
|
||
|
input.field(db)
|
||
|
}
|
||
|
}
|
||
|
|
||
|
fn main() {}
|