Nvim_set_hl usage

Hello !
Following the 0.7 changes, I am trying to translate the following snippet of my configuration to the new lua-only syntax:

function HighlightExtraWhitespace()
    vim.api.nvim_set_hl(0, 'ExtraWhitespace', { bg='Red' })
    vim.cmd[[ match ExtraWhitespace /\s\+\%#\@<!$/ ]]

The first line is the new version of vim.cmd[[ highlight ExtraWhitespace ctermbg=red guibg=red ]] and seems to be working fine.
However, I am not really sure about what to do with the second line. What is the lua-way to replicate this feature ?
I went through the documentation but did not manage to find the answer.

I don’t think there is currently a Lua equivalent to :match

I found out about vim.fn.matchadd. It seems to do the same thing as vim.cmd([[ ]]).