Struct salvo_core::conn::openssl::Keycert
source · pub struct Keycert { /* private fields */ }
Available on crate feature
openssl
only.Expand description
Private key and certificate
Implementations§
source§impl Keycert
impl Keycert
sourcepub fn key_from_path(self, path: impl AsRef<Path>) -> IoResult<Self>
pub fn key_from_path(self, path: impl AsRef<Path>) -> IoResult<Self>
Sets the Tls private key via File Path, returns IoError
if the file cannot be open.
sourcepub fn with_key(self, key: impl Into<Vec<u8>>) -> Self
pub fn with_key(self, key: impl Into<Vec<u8>>) -> Self
Sets the Tls private key via bytes slice.
sourcepub fn cert_from_path(self, path: impl AsRef<Path>) -> IoResult<Self>
pub fn cert_from_path(self, path: impl AsRef<Path>) -> IoResult<Self>
Specify the file path for the TLS certificate to use.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Keycert
impl RefUnwindSafe for Keycert
impl Send for Keycert
impl Sync for Keycert
impl Unpin for Keycert
impl UnwindSafe for Keycert
Blanket Implementations§
source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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