Classes | |
| struct | ExampleOptions |
| Options the example runs with. More... | |
Functions | |
| pub struct ExampleOptions | with_resource_key (resource_key:String) -> Self |
| Default options for a resource key: the two sample TACs and the cloud endpoint from the environment, or the public cloud when unset. | |
| pub fn | run (options:ExampleOptions) -> Result<()> |
| Run the cloud TAC-lookup example. | |
| fn | main () -> Result<()> |
| Read the resource key from the command line or the environment, then run. | |
| fn | profile_line_renders_vendor_name_model () |
| fn | profile_line_falls_back_to_unknown () |
| fn | runs_against_the_cloud () |
Variables | |
| const | FIND_OUT_MORE |
| The links the example's output ends with. | |
| const & | str |
| const | EVIDENCE_QUERY_TAC_KEY |
The cloud evidence key a Type Allocation Code is supplied under, query.tac. | |
| const | SAMPLE_TACS |
| The two sample TACs the example looks up. | |
| pub | resource_key |
| The cloud resource key. TAC lookup requires a paid subscription. | |
| pub pub | endpoint |
| An optional override for the cloud endpoint. | |
| pub pub pub | tacs |
The TACs to look up. Defaults to [SAMPLE_TACS]. | |
| mod | tests |
Function Documentation
◆ main()
| fn main | ( | ) | -> Result<()> |
Read the resource key from the command line or the environment, then run.
◆ profile_line_falls_back_to_unknown()
| fn profile_line_falls_back_to_unknown | ( | ) |
◆ profile_line_renders_vendor_name_model()
| fn profile_line_renders_vendor_name_model | ( | ) |
◆ run()
| pub fn run | ( | options:ExampleOptions | ) | -> Result<()> |
Run the cloud TAC-lookup example.
A TAC identifies a class of device, so a lookup can match several device profiles. The pipeline carries a hardware-profile cloud engine, which exposes the matches under [HARDWARE_DATA_KEY] as a list of device profiles, each read through the same typed accessors as a single-device detection.
◆ runs_against_the_cloud()
| fn runs_against_the_cloud | ( | ) |
◆ with_resource_key()
| pub struct ExampleOptions with_resource_key | ( | resource_key:String | ) | -> Self |
Default options for a resource key: the two sample TACs and the cloud endpoint from the environment, or the public cloud when unset.
Variable Documentation
◆ endpoint
| pub pub endpoint |
An optional override for the cloud endpoint.
◆ EVIDENCE_QUERY_TAC_KEY
| const EVIDENCE_QUERY_TAC_KEY |
The cloud evidence key a Type Allocation Code is supplied under, query.tac.
TAC is an input-only value, supplied as evidence and never returned in the response.
◆ FIND_OUT_MORE
| const FIND_OUT_MORE |
The links the example's output ends with.
◆ resource_key
| pub resource_key |
The cloud resource key. TAC lookup requires a paid subscription.
◆ SAMPLE_TACS
| const SAMPLE_TACS |
The two sample TACs the example looks up.
◆ str
| const & str |
◆ tacs
| pub pub pub tacs |
The TACs to look up. Defaults to [SAMPLE_TACS].
◆ tests
| mod tests |
