Trait FirecrackerUri

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

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

Required Methods§

Source

fn firecracker( host_socket_path: impl AsRef<Path>, guest_port: u32, url: impl AsRef<str>, ) -> Result<Uri, InvalidUri>

Create a new Firecracker URI with the given host socket path, guest port and in-socket URL

Source

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

Deconstruct this Firecracker URI into its host socket path and guest port

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

Source§

fn firecracker( host_socket_path: impl AsRef<Path>, guest_port: u32, url: impl AsRef<str>, ) -> Result<Uri, InvalidUri>

Source§

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

Implementors§