Exposing a struct pointer from a function library

I need to use a function from a bp function library created in c++ on a button created in blueprint, but I get an error when I try to make that function BlueprintCallable/BlueprintPure. Is there a way to do it or do I have to create a separate function where the struct is passed by value/create the button in c++?

Why do you need a pointer to a USTRUCT?

You could write a wrapper class around the struct and return a pointer to it if you need a quick fix.

It’s a pointer because the function returns the data I get from FindRow on a datatable.