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§
Sourcefn from_reader(
sop: &'s S,
source: &mut (dyn Read + Send + Sync),
source_name: Option<String>,
) -> Result<Self>where
Self: Sized,
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.
Sourcefn source_name(&self) -> Option<&str>
fn source_name(&self) -> Option<&str>
Returns the source name, if any.
Provided Methods§
Sourcefn from_stdin(sop: &'s S) -> Result<Self>where
Self: Sized,
fn from_stdin(sop: &'s S) -> Result<Self>where
Self: Sized,
Loads objects like certs and keys from stdin.