This reference describes unreleased code on main; no release documents it yet.

rlmesh::ext::BindAddress

enumPreviewuse rlmesh::ext::BindAddress;[source]

A server-side address to bind a listener to.

enum BindAddress

Build one with BindAddress::parse. Bind to TCP port 0 to let the OS assign a free port and read the result back from the bound server’s local_addr().

Tcp

variant[source]
Tcp { host: String, port: u16 }

A TCP host/port to bind. Port 0 requests an OS-assigned port.

Unix

variant[source]
Unix { path: std::path::PathBuf }

A Unix-domain socket path to bind (Unix only).

parse

associated function[source]
fn parse(value: impl AsRef<str>) -> Result<Self>

Parse a bind target such as port, host:port, tcp://host:port, or unix:///path/to.sock.

Errors

Returns Error::InvalidArgument if value is not a recognized bind target (including a unix:// path on Windows).

display_address

method[source]
fn display_address(&self) -> String

The address rendered as a tcp://host:port or unix://path string.

Trait implementations

  • impl Debug for BindAddress
  • impl Clone for BindAddress
  • impl StructuralPartialEq for BindAddress
  • impl PartialEq for BindAddress
  • impl Eq for BindAddress
  • impl Display for BindAddress
  • impl FromStr for BindAddress
  • impl From<BindAddress> for ServeModelOptions