Struct sequoia_ipc::Server[][src]

pub struct Server { /* fields omitted */ }

A server.

Implementations

impl Server[src]

pub fn new(descriptor: Descriptor) -> Result<Self>[src]

Creates a new server for the descriptor.

pub fn context() -> Result<Context>[src]

Creates a Context from env::args().

pub fn serve(&mut self) -> Result<()>[src]

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

impl !RefUnwindSafe for Server

impl Send for Server

impl Sync for Server

impl Unpin for Server

impl !UnwindSafe for Server

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,