pub enum RawOutput {
Ranking {
ids: Vec<String>,
scores: RankingScores,
},
Label(String),
Distribution(BTreeMap<String, f64>),
Logits(BTreeMap<String, f64>),
Scores(BTreeMap<String, f64>),
Screen {
blocked: bool,
categories: Vec<String>,
units: ScreenUnits,
},
TextRecord(BTreeMap<String, TextValue>),
TypedRecord {
fields: BTreeMap<String, Value>,
logprobs: Vec<FieldLogprobs>,
provider_reported: BTreeMap<String, String>,
},
}Expand description
What a backend returned, before validation.
Variants§
Ranking
Label(String)
Distribution(BTreeMap<String, f64>)
Logits(BTreeMap<String, f64>)
Scores(BTreeMap<String, f64>)
Screen
TextRecord(BTreeMap<String, TextValue>)
TypedRecord
Trait Implementations§
Source§impl<'de> Deserialize<'de> for RawOutput
impl<'de> Deserialize<'de> for RawOutput
Source§fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for RawOutput
impl JsonSchema for RawOutput
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreimpl StructuralPartialEq for RawOutput
Auto Trait Implementations§
impl Freeze for RawOutput
impl RefUnwindSafe for RawOutput
impl Send for RawOutput
impl Sync for RawOutput
impl Unpin for RawOutput
impl UnsafeUnpin for RawOutput
impl UnwindSafe for RawOutput
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more