Trait solana_sdk::signer::EncodableKey
source · pub trait EncodableKey: Sized {
// Required methods
fn read<R: Read>(reader: &mut R) -> Result<Self, Box<dyn Error>>;
fn write<W: Write>(&self, writer: &mut W) -> Result<String, Box<dyn Error>>;
// Provided methods
fn read_from_file<F: AsRef<Path>>(path: F) -> Result<Self, Box<dyn Error>> { ... }
fn write_to_file<F: AsRef<Path>>(
&self,
outfile: F
) -> Result<String, Box<dyn Error>> { ... }
}
Expand description
The EncodableKey
trait defines the interface by which cryptographic keys/keypairs are read,
written, and derived from sources.