  We prove sharp wavenumber-explicit error bounds for first- or
second-type-N\'ed\'elec-element (a.k.a. edge-element) conforming
discretisations, of arbitrary (fixed) order, of the variable-coefficient
time-harmonic Maxwell equations posed in a bounded domain with perfect electric
conductor (PEC) boundary conditions. The PDE coefficients are allowed to be
piecewise regular and complex-valued; this set-up therefore includes scattering
from a PEC obstacle and/or variable real-valued coefficients, with the
radiation condition approximated by a perfectly matched layer (PML).
  In the analysis of the $h$-version of the finite-element method, with fixed
polynomial degree $p$, applied to the time-harmonic Maxwell equations, the
$\textit{asymptotic regime}$ is when the meshwidth, $h$, is small enough (in a
wavenumber-dependent way) that the Galerkin solution is quasioptimal
independently of the wavenumber, while the $\textit{preasymptotic regime}$ is
the complement of the asymptotic regime.
  The results of this paper are the first preasymptotic error bounds for the
time-harmonic Maxwell equations using first-type N\'ed\'elec elements or
higher-than-lowest-order second-type N\'ed\'elec elements. Furthermore, they
are the first wavenumber-explicit results, even in the asymptotic regime, for
Maxwell scattering problems with a non-empty scatterer.
