Crate bgpsim_macros

Source

Macros§

net
Create a Network using a domain specific language. This proc-macro will check at compile time that all invariants are satisfied.
prefix
Create a Prefix from an ipnet::Ipv4Net string. If you provide an as, you can specify to which type the resulting Ipv4Net will be casted. If you omit the type parameter after as, then the macro will simply invoke .into() on the generated IpvtNet.

Derive Macros§

NetworkFormatter
Automatically implement the NetworkFormatter for the given type. The strings are generated similar to the derived std::fmt::Debug implementation.