Struct ipipe::Pipe[][src]

pub struct Pipe { /* fields omitted */ }

Abstraction over a named pipe

Implementations

impl Pipe[src]

pub fn open(path: &Path, on_cleanup: OnCleanup) -> Result<Self>[src]

Open or create a pipe. If on_cleanup is set to ‘DeleteOnDrop’ the named pipe will be deleted when the returned struct is deallocated. Note that this function is not platform-agnostic as unix pipe paths and Windows pipe paths are formatted differnetly.

pub fn with_name(name: &str) -> Result<Self>[src]

Open or create a pipe with the given name. Note that this is just a string name, not a path.

pub fn create() -> Result<Self>[src]

Create a pipe with a randomly generated name in a tempory directory.

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

Close a named pipe

impl Pipe[src]

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

Return the path to this named pipe

pub fn name(&self) -> Option<&OsStr>[src]

Gets the name of this pipe

Trait Implementations

impl Clone for Pipe[src]

fn clone(&self) -> Self[src]

Cloning a pipe creates a slave which points to the same path but does not close the pipe when dropped.

impl Drop for Pipe[src]

impl Read for Pipe[src]

impl Write for Pipe[src]

Auto Trait Implementations

impl RefUnwindSafe for Pipe

impl Send for Pipe

impl Sync for Pipe

impl Unpin for Pipe

impl UnwindSafe for Pipe

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.