UnixUri

Trait UnixUri 

Source
pub trait UnixUri {
    // Required methods
    fn unix(
        socket_path: impl AsRef<Path>,
        url: impl AsRef<str>,
    ) -> Result<Uri, InvalidUri>;
    fn parse_unix(&self) -> Result<PathBuf, Error>;
}
Available on crate features hyper-util and unix only.
Expand description

An extension trait for a URI that allows constructing a hex-encoded Unix socket URI.

Required Methods§

Source

fn unix( socket_path: impl AsRef<Path>, url: impl AsRef<str>, ) -> Result<Uri, InvalidUri>

Create a new Unix URI with the given socket path and in-socket URI.

Source

fn parse_unix(&self) -> Result<PathBuf, Error>

Try to deconstruct this Unix URI’s socket path.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl UnixUri for Uri

Source§

fn unix( socket_path: impl AsRef<Path>, url: impl AsRef<str>, ) -> Result<Uri, InvalidUri>

Source§

fn parse_unix(&self) -> Result<PathBuf, Error>

Implementors§