pub struct CertificateLoader;Expand description
This type can be used to load Certificates.
Implementations§
Source§impl CertificateLoader
impl CertificateLoader
Sourcepub fn save_to_folder(
cert: &Certificate,
folder: &str,
) -> Result<(), &'static str>
pub fn save_to_folder( cert: &Certificate, folder: &str, ) -> Result<(), &'static str>
Saves this certificate into a folder: one file for the certificate and one file for the private key.
Sourcepub fn load_from_folder(folder: &str) -> Result<Certificate, &'static str>
pub fn load_from_folder(folder: &str) -> Result<Certificate, &'static str>
Reads a certificate from a folder like it has been saved with save_to_folder
Sourcepub fn save_to_file(
cert: &Certificate,
filename: &str,
) -> Result<(), &'static str>
pub fn save_to_file( cert: &Certificate, filename: &str, ) -> Result<(), &'static str>
Saves the certificate in encoded form to a file
Sourcepub fn save_private_key(
cert: &Certificate,
filename: &str,
) -> Result<(), &'static str>
pub fn save_private_key( cert: &Certificate, filename: &str, ) -> Result<(), &'static str>
Saves the private key to a file. Just the binary string.
Sourcepub fn load_from_file(filename: &str) -> Result<Certificate, &'static str>
pub fn load_from_file(filename: &str) -> Result<Certificate, &'static str>
This method loads a certificate from a file.
Sourcepub fn load_private_key(
cert: &mut Certificate,
filename: &str,
) -> Result<(), &'static str>
pub fn load_private_key( cert: &mut Certificate, filename: &str, ) -> Result<(), &'static str>
This method reads a private key from a file and sets it in this certificate.
Auto Trait Implementations§
impl Freeze for CertificateLoader
impl RefUnwindSafe for CertificateLoader
impl Send for CertificateLoader
impl Sync for CertificateLoader
impl Unpin for CertificateLoader
impl UnwindSafe for CertificateLoader
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more