You do not need to directly link the crater shader and its texturing, in fact there is no specific way to do that. The "rim shader" is for procedural displacement, not for color. As I described before, you should do your major displacement, like craters, above the Compute Terrain in the Terrain group, then do texturing below the Base Colours node. Below there you can add a Surface Layer node and mask it by a Simple Shape Shader with a position, size, and shape similar to your crater, or mask it by a Painted Shader where you paint over the shape of the crater.
- Oshyan