Save a lambda function in the header

Hello, i am currently defining a lamda function which i want to save in my header file.

TSharedRef<IPersonaToolkit> PersonaToolKitRef = InPreviewScene.Get().GetPersonaToolkit();
	auto lambda = [PersonaToolKitRef]() { return PersonaToolKitRef->GetPreviewScene(); };

The lamda variable should get saved in the header. I did not manage to do this yet and now i am curious if this is even possible. I tried auto and TFunctionRef. Maybe there is a hint you guys can give me to achive this or even another way to save this call in a variable.

Are you able to use the C++ standard std::function as the declaration in your header file? That is the C++ standard for lambdas. See if that will compile properly for you. std::function - cppreference.com?