fn write_network<T: ParticleOptions>( options: &dyn ErasedParticleOptions, writer: &mut Vec<u8>, ) -> Result<()>