@@ -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 ) ]
2323pub struct FunctionId ( u64 ) ;
2424
2525impl FunctionId {
@@ -85,7 +85,7 @@ impl FunctionLocations for VecFunctionLocations {
8585pub 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 ) ]
8989pub 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 ) ]
108108pub struct Callstack {
109109 calls : Vec < CallSiteId > ,
0 commit comments