Treatment asIpv4

net/ip::asIpv4


Inputs

⇥ ip: Stream<Ip> (net/ip::Ip)

Outputs

↦ ipv4: Stream<Option<Ipv4>> (net/ip::Ipv4)


Extract the Ipv4 address from each generic Ip in the stream.

Emits none for each element that is an IPv6 address.

graph LR
     T("asIpv4()")
     A["〈🟦〉 … 〈🟨〉"] -->|ip| T
     T -->|ipv4| B["〈🟦〉 … 〈none〉"]

     style A fill:#ffff,stroke:#ffff
     style B fill:#ffff,stroke:#ffff