Struct secret_handshake::ServerHandshakerWithFilter [] [src]

pub struct ServerHandshakerWithFilter<'a, S, FilterFn, AsyncBool>(_, _);

Performs the server side of a handshake. Allows filtering clients based on their longterm public key.

Methods

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

[src]

Creates a new ServerHandshakerWithFilter 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<'a, S, FilterFn, AsyncBool> Future for ServerHandshakerWithFilter<'a, 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<'a, S, FilterFn, AsyncBool> !Send for ServerHandshakerWithFilter<'a, S, FilterFn, AsyncBool>

impl<'a, S, FilterFn, AsyncBool> !Sync for ServerHandshakerWithFilter<'a, S, FilterFn, AsyncBool>