Dual purpose device
My favorite used to be the frame pump.
As beast approaches reach down and dismount dual purpose device from frame.
Hold in vertical position by handle while maintaining speed and course.
When beast is in striking distance rotate sharply downward.
Once deployed weapon the will telescope to almost double original length- thus increasing effective range and force of impact.
A solid strike across the snout of a wild beast trying to eat you is quite satisfying.
Alas - I no longer carry a frame pump (mini pump)nor live where dogs roam. The rare event is now handled by
Stopping- Dismount - Keep bike between you and beast.
Stare and walk toward dog. Doing as cyco commune recommends.