US President Donald Trump has announced that Russia and Ukraine have agreed to begin an immediate ceasefire in attacks targeting each other's energy facilities.