Struct sequoia_ipc::Server[][src]

pub struct Server { /* fields omitted */ }
Expand description

A server.

Implementations

Creates a new server for the descriptor.

Creates a Context from env::args().

Turns this process into a server.

External servers must call this early on.

On Linux expects ‘stdin’ to be a listening TCP socket. On Windows this expects SOCKET env var to be set to a listening socket of the Windows Sockets API SOCKET value.

Examples

// We cannot run this because sequoia-store is not built yet.
use sequoia_core;
use sequoia_net;
use sequoia_store;

use sequoia_ipc::Server;

fn main() {
    let ctx = Server::context()
        .expect("Failed to create context");
    Server::new(sequoia_store::descriptor(&ctx))
        .expect("Failed to create server")
        .serve()
        .expect("Failed to start server");
}

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

Performs the conversion.

Performs the conversion.

Should always be Self

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.