sop

Trait Load

Source
pub trait Load<'s, S: SOP<'s>> {
    // Required methods
    fn from_reader(
        sop: &'s S,
        source: &mut (dyn Read + Send + Sync),
        source_name: Option<String>,
    ) -> Result<Self>
       where Self: Sized;
    fn source_name(&self) -> Option<&str>;

    // Provided methods
    fn from_stdin(sop: &'s S) -> Result<Self>
       where Self: Sized { ... }
    fn from_file<P>(sop: &'s S, path: P) -> Result<Self>
       where Self: Sized,
             P: AsRef<Path> { ... }
    fn from_bytes(sop: &'s S, source: &[u8]) -> Result<Self>
       where Self: Sized { ... }
}
Expand description

Loads objects like certs and keys.

Required Methods§

Source

fn from_reader( sop: &'s S, source: &mut (dyn Read + Send + Sync), source_name: Option<String>, ) -> Result<Self>
where Self: Sized,

Loads objects like certs and keys from the given reader.

Source

fn source_name(&self) -> Option<&str>

Returns the source name, if any.

Provided Methods§

Source

fn from_stdin(sop: &'s S) -> Result<Self>
where Self: Sized,

Loads objects like certs and keys from stdin.

Source

fn from_file<P>(sop: &'s S, path: P) -> Result<Self>
where Self: Sized, P: AsRef<Path>,

Loads objects like certs and keys from the given file.

Source

fn from_bytes(sop: &'s S, source: &[u8]) -> Result<Self>
where Self: Sized,

Loads objects like certs and keys from the given byte slice.

Implementors§