Skip to main content

ServerConfig

Struct ServerConfig 

Source
pub struct ServerConfig<'a> {
    pub alpn_protos: Option<&'a [&'a str]>,
    pub ca_cert: Option<X509<'a>>,
    pub server_cert: Option<X509<'a>>,
    pub server_key: Option<X509<'a>>,
    pub server_key_password: Option<&'a str>,
    pub use_secure_element: bool,
    pub tls_handshake_timeout_ms: u32,
}

Fields§

§alpn_protos: Option<&'a [&'a str]>

up to 9 ALPNs allowed, with avg 10 bytes for each name

§ca_cert: Option<X509<'a>>§server_cert: Option<X509<'a>>§server_key: Option<X509<'a>>§server_key_password: Option<&'a str>§use_secure_element: bool§tls_handshake_timeout_ms: u32

Overall TLS handshake timeout in milliseconds.

0 means the ESP-TLS default (10 seconds).

Only honored by the blocking EspTls::negotiate_server path. The non-blocking EspTls::negotiate_server_init / EspTls::negotiate_server_continue path (and thus EspAsyncTls::negotiate_server) is not bounded by it, so callers there should enforce their own deadline.

Only available on ESP-IDF >= 5.5.0 (esp_tls_cfg_server::tls_handshake_timeout_ms).

Implementations§

Source§

impl<'a> ServerConfig<'a>

Source

pub const fn new() -> Self

Trait Implementations§

Source§

impl<'a> Default for ServerConfig<'a>

Available on esp_idf_esp_tls_server, or esp_idf_esp_tls_using_mbedtls and esp_idf_version_at_least_5_3_0 only.
Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for ServerConfig<'a>

§

impl<'a> RefUnwindSafe for ServerConfig<'a>

§

impl<'a> Send for ServerConfig<'a>

§

impl<'a> Sync for ServerConfig<'a>

§

impl<'a> Unpin for ServerConfig<'a>

§

impl<'a> UnsafeUnpin for ServerConfig<'a>

§

impl<'a> UnwindSafe for ServerConfig<'a>

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = !

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.