mithril_common::crypto_helper

Trait SerDeShelleyFileFormat

source
pub trait SerDeShelleyFileFormat: Serialize + DeserializeOwned {
    const TYPE: &'static str;
    const DESCRIPTION: &'static str;

    // Provided methods
    fn from_file<P: AsRef<Path>>(path: P) -> Result<Self, CodecParseError> { ... }
    fn to_file<P: AsRef<Path>>(&self, path: P) -> Result<(), CodecParseError> { ... }
}
Expand description

Trait that allows any structure that implements Serialize and DeserializeOwned to be serialized and deserialized following the Shelly json format.

Required Associated Constants§

source

const TYPE: &'static str

The type of Cardano key

source

const DESCRIPTION: &'static str

The description of the Cardano key

Provided Methods§

source

fn from_file<P: AsRef<Path>>(path: P) -> Result<Self, CodecParseError>

Deserialize a type T: Serialize + DeserializeOwned from file following Cardano Shelley file format.

source

fn to_file<P: AsRef<Path>>(&self, path: P) -> Result<(), CodecParseError>

Serialize a type T: Serialize + DeserializeOwned to file following Cardano Shelley file format.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl SerDeShelleyFileFormat for OpCert

source§

const TYPE: &'static str = "NodeOperationalCertificate"

source§

const DESCRIPTION: &'static str = ""

source§

impl SerDeShelleyFileFormat for Sum6KesBytes

source§

const TYPE: &'static str = "KesSigningKey_ed25519_kes_2^6"

source§

const DESCRIPTION: &'static str = "KES Signing Key"