pub enum AddressStyle {
Bip,
Bip6,
Hex,
Mstp,
}Expand description
How a transport’s MAC addresses are shown.
Variants§
Bip
4-byte IPv4 address and 2-byte port.
Bip6
3-byte B/IPv6 VMAC, as bip6:0x0004D2 (Clause U.1.3).
Hex
Hex octets (BACnet/SC VMACs and anything else).
Mstp
A 1-byte MS/TP station, as mstp:5.
Implementations§
Source§impl AddressStyle
impl AddressStyle
Sourcepub fn of<T: TransportPort + 'static>(transport: &T) -> Self
pub fn of<T: TransportPort + 'static>(transport: &T) -> Self
The style of transport’s addresses.
Sourcepub fn format(self, mac: &[u8]) -> String
pub fn format(self, mac: &[u8]) -> String
Format a MAC for display, in a form parse_target reads back.
Sourcepub fn locate(
self,
mac: &[u8],
routed: Option<(u16, &[u8])>,
) -> (String, Option<String>)
pub fn locate( self, mac: &[u8], routed: Option<(u16, &[u8])>, ) -> (String, Option<String>)
Where a device or a reply is, as the TUI’s tables show it. For one
a router passed on, from routed (its network and its MAC there):
the routed station as routed_station writes it, and the router,
the link peer mac, in this style. Otherwise, or when the routed
MAC is empty and so names no station, mac in this style and no
router.
Trait Implementations§
Source§impl Clone for AddressStyle
impl Clone for AddressStyle
impl Copy for AddressStyle
Source§impl Debug for AddressStyle
impl Debug for AddressStyle
impl Eq for AddressStyle
Source§impl PartialEq for AddressStyle
impl PartialEq for AddressStyle
impl StructuralPartialEq for AddressStyle
Auto Trait Implementations§
impl Freeze for AddressStyle
impl RefUnwindSafe for AddressStyle
impl Send for AddressStyle
impl Sync for AddressStyle
impl Unpin for AddressStyle
impl UnsafeUnpin for AddressStyle
impl UnwindSafe for AddressStyle
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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