structs_doc.md

January 24, 2025 ยท View on GitHub

Skylib module containing functions that operate on structs.

structs.to_dict

load("@bazel_skylib//lib:structs.bzl", "structs")

structs.to_dict(s)

Converts a struct to a dict.

PARAMETERS

NameDescriptionDefault Value
sA struct.none

RETURNS

A dict whose keys and values are the same as the fields in s. The transformation is only applied to the struct's fields and not to any nested values.