Skip to content

Commit 95977ad

Browse files
committed
Make more things serializable.
1 parent 5982734 commit 95977ad

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

memapi/src/memorytracking.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ extern "C" {
1919
fn _exit(exit_code: std::os::raw::c_int);
2020
}
2121

22-
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
22+
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
2323
pub struct FunctionId(u64);
2424

2525
impl FunctionId {
@@ -85,7 +85,7 @@ impl FunctionLocations for VecFunctionLocations {
8585
pub type LineNumber = u16; // TODO u32, newtype
8686

8787
/// A specific location: file + function + line number.
88-
#[derive(Clone, Debug, PartialEq, Eq, Copy, Hash)]
88+
#[derive(Clone, Debug, PartialEq, Eq, Copy, Hash, Serialize, Deserialize)]
8989
pub struct CallSiteId {
9090
/// The function + filename. We use IDs for performance reasons (faster hashing).
9191
function: FunctionId,
@@ -103,7 +103,7 @@ impl CallSiteId {
103103
}
104104

105105
/// The current Python callstack.
106-
#[derive(Derivative)]
106+
#[derive(Derivative, Serialize, Deserialize)]
107107
#[derivative(Clone, PartialEq, Eq, Hash, Debug)]
108108
pub struct Callstack {
109109
calls: Vec<CallSiteId>,

0 commit comments

Comments
 (0)