[][src]Struct unix_fifo_async::NamedPipePath

pub struct NamedPipePath { /* fields omitted */ }

Represents a path to a Unix named pipe (FIFO).

Provides convenience methods to create readers and writers, as well as an easy way to ensure the pipe actually exists.

Methods

impl NamedPipePath[src]

pub fn new<T: Into<PathBuf>>(path: T) -> Self[src]

Wraps a given path in a NamedPipePath.

pub fn exists(&self) -> bool[src]

Checks if the path exists.

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

Ensures the path exists, creating a named pipe in its place if it doesn't.

pub async fn delete(self) -> Result<()>[src]

Tries to delete the pipe from disk and consumes the NamedPipe.

pub fn open_read(&self) -> NamedPipeReader[src]

Creates a reader for this named pipe.

pub fn open_write(&self) -> NamedPipeWriter[src]

Creates a writer for this named pipe.

Trait Implementations

impl Clone for NamedPipePath[src]

Auto Trait Implementations

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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

impl<T> From<T> for 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<T> BorrowMut<T> for T where
    T: ?Sized
[src]

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

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