Struct poem::listener::OpensslTlsConfig
source · [−]pub struct OpensslTlsConfig { /* private fields */ }
Available on crate feature
server
only.Expand description
Openssl configuration contains certificate’s chain and private key.
Implementations
sourceimpl OpensslTlsConfig
impl OpensslTlsConfig
sourcepub fn cert_from_data(self, cert_data: impl Into<Vec<u8>>) -> Self
pub fn cert_from_data(self, cert_data: impl Into<Vec<u8>>) -> Self
Sets certificate’s chain from PEM data.
sourcepub fn cert_from_file(self, cert_file: impl AsRef<Path>) -> Self
pub fn cert_from_file(self, cert_file: impl AsRef<Path>) -> Self
Sets file path to certificate’s chain in PEM format.
sourcepub fn key_from_data(self, key_data: impl Into<Vec<u8>>) -> Self
pub fn key_from_data(self, key_data: impl Into<Vec<u8>>) -> Self
Sets private key from PEM data.
sourcepub fn key_from_file(self, key_file: impl AsRef<Path>) -> Self
pub fn key_from_file(self, key_file: impl AsRef<Path>) -> Self
Sets file path to private key in PEM format.
Trait Implementations
sourceimpl Default for OpensslTlsConfig
impl Default for OpensslTlsConfig
sourceimpl IntoTlsConfigStream<OpensslTlsConfig> for OpensslTlsConfig
impl IntoTlsConfigStream<OpensslTlsConfig> for OpensslTlsConfig
type Stream = Once<Ready<OpensslTlsConfig>>
type Stream = Once<Ready<OpensslTlsConfig>>
Represents a tls config stream.
sourcefn into_stream(self) -> IoResult<Self::Stream>
fn into_stream(self) -> IoResult<Self::Stream>
Consume itself and return tls config stream.
sourceimpl<T> IntoTlsConfigStream<OpensslTlsConfig> for Twhere
T: Stream<Item = OpensslTlsConfig> + Send + 'static,
impl<T> IntoTlsConfigStream<OpensslTlsConfig> for Twhere
T: Stream<Item = OpensslTlsConfig> + Send + 'static,
type Stream = T
type Stream = T
Represents a tls config stream.
sourcefn into_stream(self) -> IoResult<Self::Stream>
fn into_stream(self) -> IoResult<Self::Stream>
Consume itself and return tls config stream.
Auto Trait Implementations
impl RefUnwindSafe for OpensslTlsConfig
impl Send for OpensslTlsConfig
impl Sync for OpensslTlsConfig
impl Unpin for OpensslTlsConfig
impl UnwindSafe for OpensslTlsConfig
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more