VsockUri

Trait VsockUri 

Source
pub trait VsockUri {
    // Required methods
    fn vsock(addr: VsockAddr, url: impl AsRef<str>) -> Result<Uri, InvalidUri>;
    fn parse_vsock(&self) -> Result<VsockAddr, Error>;
}
Available on crate features hyper-util and vsock only.
Expand description

An extension trait for hyper URI that allows constructing a hex-encoded virtio-vsock socket URI.

Required Methods§

Source

fn vsock(addr: VsockAddr, url: impl AsRef<str>) -> Result<Uri, InvalidUri>

Create a new vsock URI with the given vsock address and in-socket URL

Source

fn parse_vsock(&self) -> Result<VsockAddr, Error>

Deconstruct this vsock URI into its address.

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 VsockUri for Uri

Implementors§