European law is strict as to overarching principles. We saw this in the judgment by the European Court of Justice regarding the border program. To my knowledge, European law deals with these matters according to broad principles. In general, it allows departments and government to gather information only when it is necessary and commensurate with the objective in question. To my knowledge, there is no specific rule for the application of these broad principles to customs practices. That said, we could make some enquiries in that regard.
As to the extent of border powers, the issue, in my opinion, is that there is extensive jurisprudence in Canada indicating that the expectation of privacy at the border is less than in other situations since the person is seeking entry to another country. I think this principle remains valid. It has, however, been used to severely limit if not eliminate judicial guarantees at the border.
With the advent of electronic devices, we have to ask some questions. Customs officials have the right to conduct certain searches at the border, but should that extend to searching financial records on a person's telephone, information about their intimate relationships, or the person's health, for instance? Asking the question gives you the answer. Canada needs to get with the times and treat these devices as they should be treated legally.