In Europe, there are plastic white flagstaffs with red reflectors, that extend to the side of the bike that traffic passes on. They attach to rear cargo racks, and flex or break if stricken by a car.
I have seen American cyclists using red or orange swimming pool toys , foam noodles, attached to the rear rack for the same purpose.