ListFieldsParams
The parameter struct and builder for HistoricalClient::metadata::list_fields.
The builder can be instantiated with the associated function builder(), and the struct is created from the builder with the build() method.
For every field, there is an identically named setter method on the builder.
Fields
| Field | Type | Description |
|---|---|---|
encoding | Encoding | The data encoding. Encoding::Dbn is recommended. |
schema | Schema | The data record schema. Must be one of the values from list_schemas. |
dataset | Option<String> | The dataset used to determine which fields are relevant. If None then the fields for the latest DBN encoding version are returned, which may differ from a specific dataset's schema. |
API method
pub struct ListFieldsParams {
pub encoding: Encoding,
pub schema: Schema,
pub dataset: Option<String>,
} Example usage
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
use databento::{
dbn::{Encoding, Schema},
historical::metadata::ListFieldsParams,
};
assert_eq!(
ListFieldsParams {
schema: Schema::Tbbo,
encoding: Encoding::Csv,
dataset: None,
},
ListFieldsParams::builder()
.schema(Schema::Tbbo)
.encoding(Encoding::Csv)
.build()
);