pub struct PortSpec {
pub name: Option<String>,
pub bind: PortBind,
pub listen: String,
pub connect: String,
pub search: Option<u16>,
pub options: BTreeMap<String, String>,
}Expand description
An incus proxy device. Written as docker’s [HOST_IP:]PUBLISHED:TARGET[/PROTOCOL],
its long form (PortMapping in the schema), or the incus form (ProxyPort).
Fields§
§name: Option<String>Device name. Default: port-<bind>-<listen port>.
bind: PortBind§listen: Stringincus listen address (tcp:HOST:PORT, or any shorthand normalize_addr
accepts).
connect: Stringincus connect address, same forms.
search: Option<u16>Host-bound TCP/UDP only: if the listen port is taken, try the next one,
up to this many more. Written in the file as a published range
(5173-5223:5173).
options: BTreeMap<String, String>Extra proxy device properties, verbatim.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PortSpec
impl<'de> Deserialize<'de> for PortSpec
Source§fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for PortSpec
impl JsonSchema for PortSpec
Source§fn json_schema(g: &mut SchemaGenerator) -> Schema
fn json_schema(g: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreimpl StructuralPartialEq for PortSpec
Auto Trait Implementations§
impl Freeze for PortSpec
impl RefUnwindSafe for PortSpec
impl Send for PortSpec
impl Sync for PortSpec
impl Unpin for PortSpec
impl UnsafeUnpin for PortSpec
impl UnwindSafe for PortSpec
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more