Oneshot

Type Alias Oneshot 

Source
pub type Oneshot = Oneshot<OwnedReadHalf, OwnedWriteHalf>;
Expand description

Invoke and Accept implementation in terms of a single UnixStream.

Either Invoke::invoke or Accept::accept can only be called at most once on Oneshot, repeated calls with return an error

Aliased Type§

pub struct Oneshot(/* private fields */);

Implementations§

Source§

impl Oneshot

Source

pub fn unix_pair() -> Result<(Oneshot, Oneshot)>

Creates a pair of connected Oneshot using UnixStream::pair.

Trait Implementations§

Source§

impl From<UnixStream> for Oneshot

Source§

fn from(stream: UnixStream) -> Self

Converts to this type from the input type.