2021-09-24 15:24:43 +00:00
|
|
|
<!-- Generated with Stardoc: http://skydoc.bazel.build -->
|
|
|
|
|
2021-10-27 13:13:59 +00:00
|
|
|
Skylib module containing functions that operate on structs.
|
|
|
|
|
2022-08-30 18:57:34 +00:00
|
|
|
<a id="structs.to_dict"></a>
|
2021-09-24 15:24:43 +00:00
|
|
|
|
2019-02-28 22:43:57 +00:00
|
|
|
## structs.to_dict
|
|
|
|
|
|
|
|
<pre>
|
|
|
|
structs.to_dict(<a href="#structs.to_dict-s">s</a>)
|
|
|
|
</pre>
|
|
|
|
|
|
|
|
Converts a `struct` to a `dict`.
|
|
|
|
|
2021-09-24 15:24:43 +00:00
|
|
|
**PARAMETERS**
|
|
|
|
|
|
|
|
|
|
|
|
| Name | Description | Default Value |
|
2021-10-27 13:13:59 +00:00
|
|
|
| :------------- | :------------- | :------------- |
|
2024-04-24 21:40:06 +00:00
|
|
|
| <a id="structs.to_dict-s"></a>s | A `struct`. | none |
|
2021-10-27 13:13:59 +00:00
|
|
|
|
|
|
|
**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.
|
2019-02-28 22:43:57 +00:00
|
|
|
|
|
|
|
|