Skip to main content

Oneshot

Type Alias Oneshot 

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

Invoke implementation in terms of a single UnixStream.

Invoke::invoke can only be called at most once on Oneshot, repeated calls will return an error.

Aliased Type§

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

Implementations§

Source§

impl Oneshot

Source

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

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.