[][src]Struct unix_ipc::Bootstrapper

pub struct Bootstrapper<T> { /* fields omitted */ }

A bootstrap helper.

This creates a unix socket that is linked to the file system so that a Receiver can connect to it. It lets you send one or more messages to the connected receiver.

Methods

impl<T: Serialize + DeserializeOwned> Bootstrapper<T>[src]

pub fn new() -> Result<Bootstrapper<T>>[src]

Creates a bootstrapper at a random socket in /tmp.

pub fn bind<P: AsRef<Path>>(p: P) -> Result<Bootstrapper<T>>[src]

Creates a bootstrapper at a specific socket path.

pub fn path(&self) -> &Path[src]

Returns the path of the socket.

pub fn send(&self, val: T) -> Result<()>[src]

Consumes the boostrapper and sends a single value in.

This can be called multiple times to send more than one value into the inner socket.

Trait Implementations

impl<T: Debug> Debug for Bootstrapper<T>[src]

impl<T> Drop for Bootstrapper<T>[src]

Auto Trait Implementations

impl<T> !RefUnwindSafe for Bootstrapper<T>

impl<T> Send for Bootstrapper<T> where
    T: Send

impl<T> !Sync for Bootstrapper<T>

impl<T> Unpin for Bootstrapper<T> where
    T: Unpin

impl<T> UnwindSafe for Bootstrapper<T> where
    T: UnwindSafe

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, 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>,