ReadWrite

Trait ReadWrite 

Source
pub trait ReadWrite: Serialize + DeserializeOwned {
    // Required method
    fn create_null() -> Self;
}
Expand description

A trait which allows structs with Serialize and Deserialize to have a null constructor which Python can fill with data. This allows such structs to be pickle-able from the Python API.

Required Methods§

Source

fn create_null() -> Self

Create a null version of the object which acts as a shell into which Python’s pickle module can load data. This generally shouldn’t be used to construct the struct in regular code.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl ReadWrite for MCMCSummary

Source§

fn create_null() -> Self

Source§

impl ReadWrite for MinimizationSummary

Source§

fn create_null() -> Self

Implementors§