pub fn dump(
script_name: &str,
type_check: Option<&TypeCheckState>,
state: SessionRef<'_>,
) -> Result<Vec<u8>, Error>Available on crate features
code and embedded-python only.Expand description
Serializes a live session and its metadata into a versioned dump, readable
by Dump::load.
Takes the state by reference because dumping is read-only: the caller keeps its session and can carry on feeding it.
ยงErrors
Returns an error if serialization fails.