Electron–phonon scattering and excitonic effects in T-carbon