Electromagnetism and Generalized Continua