logo
pub struct ServerHandshake<S> { /* private fields */ }
Expand description

A representation of an in-progress handshake, server-side

This would typically be used to implement a D-Bus broker, or in the context of a P2P connection.

This struct is an async-compatible representation of the initial handshake that must be performed before a D-Bus connection can be used. To use it, you should call the advance_handshake method whenever the underlying socket becomes ready (tracking the readiness itself is not managed by this abstraction) until it returns Ok(()), at which point you can invoke the try_finish method to get an Authenticated, which can be given to Connection::new_authenticated.

If handling the handshake asynchronously is not necessary, the blocking_finish method is provided which blocks until the handshake is completed or an error occurs.

Implementations

Same as Handshake::advance_handshake. Only exists for backwards compatibility.

Same as Handshake::try_finish. Only exists for backwards compatibility.

Same as Handshake::socket. Only exists for backwards compatibility.

Block and automatically drive the handshake for this server

This method will block until the handshake is finalized, even if the socket is in non-blocking mode.

Trait Implementations

Formats the value using the given formatter. Read more

The next I/O operation needed for advancing the handshake. Read more

Attempt to advance the handshake Read more

Attempt to finalize this handshake into an initialized client. Read more

Access the socket backing this handshake Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.