pub fn encode(msg: BgpMessage) -> Result<Vec<u8>>Expand description
Encode a message netgauze can represent (OPEN, UPDATE, KEEPALIVE, ROUTE-REFRESH).
The encoder is a pure function of the message value — in particular the codec’s asn4 flag
does not influence the output, so the two/four-octet AS_PATH choice must be made when the
AsPath is built. See build_update.