Water-Mediated Ionic Migration in Memristive Nanowires with a Tunable Resistive Switching Mechanism