MakeGenericLiteral
Constructs a core.Literal object from a structpb.Struct by wrapping it as a generic scalar value.
def MakeGenericLiteral(
v: *structpb.Struct
) - > *core.Literal
Constructs a core.Literal object from a structpb.Struct, embedding the struct as a generic scalar value. This function is used to wrap a structured protocol buffer message into a literal type.
Parameters
| Name | Type | Description |
|---|---|---|
| v | *structpb.Struct | The structpb.Struct to be embedded as a generic literal value within the core.Literal object. |
Returns
| Type | Description |
|---|---|
*core.Literal | A pointer to a core.Literal object containing the provided structpb.Struct as a generic scalar value. |