Is there a way to enable OSL structs in Cycles shader 'script' node?

Exampe OSL structure.

struct PbrBundle {
    color SurfaceColor;
    float Subsurface;
    float Metallic;
    float Specular;
    float Roughness;
    color EmissiveColor;
    float EmissiveIntensity;

There is a shader, which takes all PbrBundle records and unifies them into a PbrBundle.

shader packPbr
    string as_node_name = "Pack PBR parameters.",
    string as_category = "util"
    color SurfaceColor = 0.8
    [[ string label = "amplitude 0"]],
    float Subsurface = 0.0,
    float Metallic = 0.0,
    float Specular = 0.5,
    float Roughness = 0.5,
    color EmissiveColor = 0.0,
    float EmissiveIntensity = 0.0,
    output PbrBundle PbrB = {0}
    PbrB.SurfaceColor       = SurfaceColor;
    PbrB.Subsurface         = Subsurface;
    PbrB.Metallic           = Metallic;
    PbrB.Specular           = Specular;
    PbrB.Roughness          = Roughness;
    PbrB.EmissiveColor      = EmissiveColor;
    PbrB.EmissiveIntensity  = EmissiveIntensity;

There is another shader, which composites PbrBundle’s to create new PbrBundle’s. With it I like to create composite materials for texturing in Blender.

However. What Cycles does . It splits the PbrBundle struct (PbrB) into its components.

Do you know a way how to enable OSL structs in Cycles nodes in Blender 2.80?

Why I care about this.

Imagine you like to use procedural textures and OSL for texture painting. For a PBR workflow you have to manage different slots. Like BaseColor, Metallic (0…1), Roughness and so on.

You can put all of them into an OSL struct. It gives you an abstraction layer. So, instead of fiddling around with many nodes and connections you can separate your workflow into modules. Modules are just node groups which generate a Pbr Struct.

Next step would be to create a blender library of modules for different materials. Which could be re-used and composed in a texturing workflow.