mirror of
https://github.com/salsa-rs/salsa.git
synced 2025-01-14 09:01:11 +00:00
18 lines
318 B
Rust
18 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() {}
|