pub trait PemSerilizable: ToWriter + FromReader {
// Required method
fn label() -> &'static str;
// Provided methods
fn write_pem_file(&self, path: &Path) -> Result<()> { ... }
fn read_pem_file(path: &Path) -> Result<Self> { ... }
}
Expand description
Trait for data that can be written to and read from PEM files.
Required Methods§
Provided Methods§
Sourcefn write_pem_file(&self, path: &Path) -> Result<()>
fn write_pem_file(&self, path: &Path) -> Result<()>
Write to PEM file with label from Self::label()
.
Sourcefn read_pem_file(path: &Path) -> Result<Self>
fn read_pem_file(path: &Path) -> Result<Self>
Read in from PEM file, ensuring the label matches Self::label()
.
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.