Debian Codegraph @

third_party/rust/context_id/src/callback.rs

raw
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4
5 #[uniffi::export(callback_interface)]
6 pub trait ContextIdCallback: Sync + Send {
7 fn persist(&self, context_id: String, creation_date: i64);
8 fn rotated(&self, old_context_id: String);
9 }
10
11 pub struct DefaultContextIdCallback;
12 impl ContextIdCallback for DefaultContextIdCallback {
13 fn persist(&self, _context_id: String, _creation_date: i64) {}
14 fn rotated(&self, _old_context_id: String) {}
15 }