pub struct PortProfile {Show 16 fields
pub index: u32,
pub name: Option<String>,
pub link_state: PortState,
pub mode: PortMode,
pub native_network_id: Option<String>,
pub native_vlan_id: Option<u16>,
pub native_network_name: Option<String>,
pub tagged_network_ids: Vec<String>,
pub tagged_vlan_ids: Vec<u16>,
pub tagged_network_names: Vec<String>,
pub tagged_all: bool,
pub poe_mode: Option<PoeMode>,
pub speed_setting: Option<PortSpeedSetting>,
pub link_speed_mbps: Option<u32>,
pub stp_state: StpState,
pub port_profile_id: Option<String>,
}Expand description
VLAN and physical profile for a switch port, merged from the Session API’s
port_table (live state) and port_overrides (user configuration).
Fields§
§index: u321-based port index as shown in the UniFi UI.
name: Option<String>User-configured port label (from overrides) or auto-generated name.
link_state: PortStateLink state (up/down/unknown).
mode: PortModeOperational mode (access / trunk / mirror / unknown).
native_network_id: Option<String>Session _id of the native (untagged) network, if any.
native_vlan_id: Option<u16>Resolved VLAN id of the native network, if known.
native_network_name: Option<String>Resolved display name of the native network, if known.
tagged_network_ids: Vec<String>Session _ids of explicitly tagged networks.
tagged_vlan_ids: Vec<u16>Resolved VLAN ids of explicitly tagged networks (best-effort).
tagged_network_names: Vec<String>Resolved display names of explicitly tagged networks (best-effort).
tagged_all: boolWhether the trunk carries all tagged VLANs (UniFi “tagged_vlan_mgmt=auto”).
poe_mode: Option<PoeMode>Configured PoE mode, if the port supports PoE.
speed_setting: Option<PortSpeedSetting>Configured link speed setting.
link_speed_mbps: Option<u32>Current negotiated link speed in Mbps, from live state.
stp_state: StpStateSTP state reported by the switch.
port_profile_id: Option<String>Reference to a named port profile (portconf), if one is applied.
Trait Implementations§
Source§impl Clone for PortProfile
impl Clone for PortProfile
Source§fn clone(&self) -> PortProfile
fn clone(&self) -> PortProfile
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more