Roll out the dough for the crust: Take the dough out of the fridge and let it sit on the counter for a few minutes to soften slightly for easy rolling. On a floured surface, roll dough out into a 12-inch (30cm) circle, then place gently into a 9-inch pie pan; you can do this by flouring a rolling pin and rolling the dough loosely around it, then unrolling it into the pan. With a sharp knife, trim the edges of the pastry to fit the pie pan. Use a fork to create a decorative border or crimp the edges using your fingers. Chill in the fridge for 30 minutes before baking.
Bake the crust: Press parchment paper or aluminum foil tightly against the crust, covering the edges to prevent them from burning. Fill with pie weights/dried beans/uncooked rice. Bake crust for about 20 minutes until the foil no longer sticks to the crust. Transfer crust to a wire rack and remove weights and foil. Bake crust for about 10 minutes longer until golden brown and the bottom feels dry to the touch. Transfer to a wire rack and allow to cool completely.
Make the coconut cream filling: In a medium bowl, whisk together egg yolks and sugar until combined, then whisk in cornstarch and salt. Set aside.
In a medium saucepan, heat milk (or heavy cream) and coconut milk on medium heat just to a boil. Remove from heat and gradually pour the hot milk mixture into the egg mixture while simultaneously whisking constantly until smooth (this will prevent the eggs from being cooked by the heat). Transfer mixture back into saucepan. Cook over medium-low heat, whisking constantly and vigorously so that the eggs won’t curdle, until mixture thickens and bubbles burst on the surface. Remove from heat and whisk in butter, vanilla, and rum. Strain through a fine-mesh strainer set over a bowl. Mix in dried coconut. Cover with plastic wrap directly on top of the filling to prevent a skin from forming. Allow to cool slightly, then spread over the crust. Refrigerate until chilled.
Make the whipped cream: Using a mixer fitted with the whisk attachment, whisk heavy cream, sugar, and vanilla on medium-low speed for several seconds. Increase speed to high and whisk until stiff peaks form and whipped cream is thick and spreadable. Spread the whipped cream on top the coconut cream filling. You can make swirls using the back of a spoon. Sprinkle with toasted coconut if you like. Refrigerate for at least 5 hours or overnight to ensure that the filling is completely set. You can make the pie 1 day ahead of serving.