Skip to main content

tvscreener/field/generated/
rating.rs

1// Copyright 2026 tvscreener-rs contributors
2// SPDX-License-Identifier: Apache-2.0
3
4// Generated by scripts/regen_fields_json.py. Do not edit by hand.
5
6/// Strong Buy.
7pub const STRONG_BUY: RatingBand = RatingBand {
8    const_name: "STRONG_BUY",
9    min: 0.5,
10    max: 1.0,
11    label: "Strong Buy",
12};
13/// Buy.
14pub const BUY: RatingBand = RatingBand {
15    const_name: "BUY",
16    min: 0.1,
17    max: 0.5,
18    label: "Buy",
19};
20/// Neutral.
21pub const NEUTRAL: RatingBand = RatingBand {
22    const_name: "NEUTRAL",
23    min: -0.1,
24    max: 0.1,
25    label: "Neutral",
26};
27/// Sell.
28pub const SELL: RatingBand = RatingBand {
29    const_name: "SELL",
30    min: -0.5,
31    max: -0.1,
32    label: "Sell",
33};
34/// Strong Sell.
35pub const STRONG_SELL: RatingBand = RatingBand {
36    const_name: "STRONG_SELL",
37    min: -1.0,
38    max: -0.5,
39    label: "Strong Sell",
40};
41/// Unknown.
42pub const UNKNOWN: RatingBand = RatingBand {
43    const_name: "UNKNOWN",
44    min: f64::NAN,
45    max: f64::NAN,
46    label: "Unknown",
47};
48
49/// All rating bands in declaration order.
50pub const ALL: &[RatingBand] = &[STRONG_BUY, BUY, NEUTRAL, SELL, STRONG_SELL, UNKNOWN];
51
52/// All known rating constant names.
53pub const ALL_CONST_NAMES: &[&str] = &[
54    "STRONG_BUY",
55    "BUY",
56    "NEUTRAL",
57    "SELL",
58    "STRONG_SELL",
59    "UNKNOWN",
60];