Edit: PROBLEM SOLVED!!!
More searches take me to this, which gave me a solution. Apparently one can have a filter function inside a struct (or at least that's what I've understood).
Thank you all who have taken a look. Please close the thread and have a great day <3...