pub trait Loadable: Sized {
    type Error: Debug + Display;

    // Required method
    fn from_path<P: AsRef<Path>>(path: P) -> Result<Self, Self::Error>;
}
Expand description

A value that can be loaded from a file.

Required Associated Types§

source

type Error: Debug + Display

Error that can occur when attempting to load.

Required Methods§

source

fn from_path<P: AsRef<Path>>(path: P) -> Result<Self, Self::Error>

Loads a value from the given input path.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Loadable for (Chainspec, ChainspecRawBytes)

§

type Error = Error

source§

fn from_path<P: AsRef<Path>>(path: P) -> Result<Self, Self::Error>

source§

impl Loadable for Arc<SecretKey>

§

type Error = ErrorExt

source§

fn from_path<P: AsRef<Path>>(path: P) -> Result<Self, Self::Error>

source§

impl Loadable for Vec<u8>

§

type Error = ReadFileError

source§

fn from_path<P: AsRef<Path>>(path: P) -> Result<Self, Self::Error>

source§

impl Loadable for PKey<Private>

§

type Error = Error

source§

fn from_path<P: AsRef<Path>>(path: P) -> Result<Self, Self::Error>

source§

impl Loadable for X509

§

type Error = Error

source§

fn from_path<P: AsRef<Path>>(path: P) -> Result<Self, Self::Error>

Implementors§