Struct rustls_ffi::client::rustls_client_config

source ·
pub struct rustls_client_config { /* private fields */ }
Expand description

A client config that is done being constructed and is now read-only.

Under the hood, this object corresponds to an Arc<ClientConfig>. https://docs.rs/rustls/latest/rustls/struct.ClientConfig.html

Implementations§

source§

impl rustls_client_config

source

#[no_mangle]
pub extern "C" fn rustls_client_config_free( config: *const rustls_client_config, )

“Free” a rustls_client_config previously returned from rustls_client_config_builder_build.

Since rustls_client_config is actually an atomically reference-counted pointer, extant client connections may still hold an internal reference to the Rust object.

However, C code must consider this pointer unusable after “free“ing it.

Calling with NULL is fine. Must not be called twice with the same value.

source

#[no_mangle]
pub extern "C" fn rustls_client_connection_new( config: *const rustls_client_config, server_name: *const c_char, conn_out: *mut *mut rustls_connection, ) -> rustls_result

Create a new rustls_connection containing a client connection and return it in the output parameter conn_out.

If this returns an error code, the memory pointed to by conn_out remains unchanged.

If this returns a non-error, the memory pointed to by conn_out is modified to point at a valid rustls_connection. The caller now owns the rustls_connection and must call rustls_connection_free when done with it.

The server_name parameter can contain a hostname or an IP address in textual form (IPv4 or IPv6). This function will return an error if it cannot be parsed as one of those types.

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

source§

fn into(self) -> U

Calls U::from(self).

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

source§

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

source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

source§

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

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

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

Performs the conversion.