According to volts500 :
That rule is intended to prevent you using flex cords and cables for permanent (ie: in wall, supplying receptacles etc) wiring.
If you surface mount a ceiling fan and put a cord on it, it's not "wiring of a structure" any more than hanging a recharging electric razor on a hook.