Regarding b r's point: we all need to learn from mistakes, and that includes the mistakes that other people make which might hurt us!
From the description the driver was 100% at fault, but it is still good to analyse it and think about how you can avoid getting hurt when someone else does something stupid like that in the future.
This video has being doing the rounds recently including a thread on here and it sounds a fairly similar situation to what the OP describes:
Again 100% the drivers fault. Cyclist was wearing bright clothes and holding a good road position.
But a more experienced rider might have anticipated the possibility of the driver doing something stupid and been quicker to react.
(I'm not sure that riding slowly is necessarily the answer by the way, as increased speed differential brings its own dangers with angry drivers tailgating, trying to squeeze past where they shouldn't or making punishment passes)