pub fn parse(packet: &EthernetPacket) -> Ethernet {
        Ethernet {
            layer: ethernet::Ethernet {
                destination: packet.get_destination(),
                source: packet.get_source(),
                ethertype: packet.get_ethertype(),
                payload: vec![],
            },
        }
    }
/// Creates an `Ethernet` according to the given Ethernet packet.
Creates an `Ethernet` according to the given Ethernet packet.
Creates an ` Ethernet ` according to the given Ethernet packet .
pub fn parse(packet: &EthernetPacket) -> Ethernet {
        Ethernet {
            layer: ethernet::Ethernet {
                destination: packet.get_destination(),
                source: packet.get_source(),
                ethertype: packet.get_ethertype(),
                payload: vec![],
            },
        }
    }
pub fn parse ( packet : & EthernetPacket ) -> Ethernet { Ethernet { layer : ethernet :: Ethernet { destination : packet . get_destination ( ) , source : packet . get_source ( ) , ethertype : packet . get_ethertype ( ) , payload : vec ! [ ] , } , } }
Creates an `Ethernet` according to the given Ethernet packet.
Creates an ` Ethernet ` according to the given Ethernet packet .
packet
&EthernetPacket