When Mark Carney declared victory in Canada’s general election, he struck a defiant tone against Donald Trump.