pub fn encode_advertisement( advertisement: &DiscoveryAdvertisement, ) -> Result<Vec<u8>, DiscoveryEncodeError>