Metal-encased semiconductor nanowires as waveguides for ultrasmall lasers