pub struct L2Config {
pub mode: L2Mode,
pub access_vlan: Option<u16>,
pub trunk_allowed: Option<Vec<u16>>,
pub trunk_native: Option<u16>,
}Expand description
Layer-2 switchport configuration.
Fields§
§mode: L2Modeswitchport mode access or switchport mode trunk.
access_vlan: Option<u16>switchport access vlan <id>
trunk_allowed: Option<Vec<u16>>switchport trunk allowed vlan … — expanded VLAN list.
trunk_native: Option<u16>switchport trunk native vlan <id>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for L2Config
impl<'de> Deserialize<'de> for L2Config
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<L2Config, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<L2Config, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for L2Config
impl Serialize for L2Config
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for L2Config
impl RefUnwindSafe for L2Config
impl Send for L2Config
impl Sync for L2Config
impl Unpin for L2Config
impl UnsafeUnpin for L2Config
impl UnwindSafe for L2Config
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