Struct secret_handshake::OwningServerHandshakerWithFilter [] [src]

pub struct OwningServerHandshakerWithFilter<S, FilterFn, AsyncBool> { /* fields omitted */ }

Performs the server side of a handshake. Allows filtering clients based on their longterm public key. This copies the keys so that it isn't constrainted by their lifetime.

Methods

impl<S, FilterFn, AsyncBool> OwningServerHandshakerWithFilter<S, FilterFn, AsyncBool> where
    S: AsyncRead + AsyncWrite,
    FilterFn: FnOnce(&PublicKey) -> AsyncBool,
    AsyncBool: Future<Item = bool>, 
[src]

[src]

Creates a new OwningServerHandshakerWithFilter to accept a connection from a client which knows the server's public key and uses the right app key over the given stream.

Once the client has revealed its longterm public key, filter_fn is invoked. If the returned AsyncBool resolves to Ok(Ready(false)), the handshake is aborted.

Trait Implementations

impl<S, FilterFn, AsyncBool> Future for OwningServerHandshakerWithFilter<S, FilterFn, AsyncBool> where
    S: AsyncRead + AsyncWrite,
    FilterFn: FnOnce(&PublicKey) -> AsyncBool,
    AsyncBool: Future<Item = bool>, 
[src]

Future implementation to asynchronously drive a handshake.

A successful value

An error

[src]

Attempt to resolve the future to a final value, registering the current task for wakeup if the value is not yet available. Read more

Auto Trait Implementations

impl<S, FilterFn, AsyncBool> !Send for OwningServerHandshakerWithFilter<S, FilterFn, AsyncBool>

impl<S, FilterFn, AsyncBool> !Sync for OwningServerHandshakerWithFilter<S, FilterFn, AsyncBool>