Skip to content

Commit

Permalink
Added warning to initializer comment
Browse files Browse the repository at this point in the history
  • Loading branch information
maddeleine committed Nov 17, 2023
1 parent 2df4e9a commit 1980c7a
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions bindings/rust/s2n-tls/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -770,11 +770,15 @@ impl Default for Context {
}
}

/// A trait executed before a new connection negotiates TLS.
/// A trait executed asynchronously before a new connection negotiates TLS.
///
/// Used for dynamic configuration of a specific connection. Note that this trait
///
/// <div class="warning">This trait is polled to completion inside of the
/// [connection::poll_negotiate function].(`crate::connection::poll_negotiate()`)
/// Therefore, negotiation of the TLS connection will not begin until the Future has completed.
/// </div>
///
/// Used for any dynamic configuration of the connection.
/// Use in conjunction with
/// [config::Builder::set_connection_initializer](`crate::config::Builder::set_connection_initializer()`).
pub trait ConnectionInitializer: 'static + Send + Sync {
/// The application can return an `Ok(None)` to resolve the callback
/// synchronously or return an `Ok(Some(ConnectionFuture))` if it wants to
Expand Down

0 comments on commit 1980c7a

Please sign in to comment.