Coexistence of volatile and non-volatile resistive switching in 2D h-BN based electronic synapses