MCPcopy Index your code
hub / github.com/RustPython/RustPython / serialize

Method serialize

crates/vm/src/builtins/traceback.rs:128–136  ·  view source on GitHub ↗
(&self, s: S)

Source from the content-addressed store, hash-verified

126#[cfg(feature = "serde")]
127impl serde::Serialize for PyTraceback {
128 fn serialize<S: serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
129 use serde::ser::SerializeStruct;
130
131 let mut struc = s.serialize_struct("PyTraceback", 3)?;
132 struc.serialize_field("name", self.frame.code.obj_name.as_str())?;
133 struc.serialize_field("lineno", &self.lineno.get())?;
134 struc.serialize_field("filename", self.frame.code.source_path().as_str())?;
135 struc.end()
136 }
137}

Callers

nothing calls this directly

Calls 4

as_strMethod · 0.45
getMethod · 0.45
source_pathMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected