GoodMemGoodMem
ReferenceSdkRustTypes

DecisionContent

Rust struct goodmem::models::DecisionContent: declaration, fields or variants, and implementations.

All types

Struct DecisionContent

goodmem::models::DecisionContent

Set exactly one of text, jsonValue, objectValue, arrayValue, or media. Use text for ordinary text. Use jsonValue to preserve a complete JSON value, including the exact precision of its numbers.

pub struct DecisionContent {
    pub json_value: Option<String>,
    pub text: Option<String>,
    pub object_value: Option<Box<DecisionObject>>,
    pub array_value: Option<Box<DecisionArray>>,
    pub media: Option<Box<DecisionMedia>>,
}

Referenced types: DecisionArray, DecisionMedia, DecisionObject.

Fields

json_value

pub json_value: Option<String>

A complete JSON value encoded as a string. For example, {"jsonValue":"null"} represents JSON null. For ordinary text, use the text field. Wire name: jsonValue.

text

pub text: Option<String>

Ordinary text without JSON quoting. Wire name: text.

object_value

pub object_value: Option<Box<DecisionObject>>

Object whose fields can contain nested media. Wire name: objectValue.

array_value

pub array_value: Option<Box<DecisionArray>>

Ordered array whose elements can contain nested media. Wire name: arrayValue.

media

pub media: Option<Box<DecisionMedia>>

Media file included in the request. GoodMem does not download media from URLs. Wire name: media.

Implementations

validate

pub fn validate(&self) -> crate::Result<()>

Validate the request before sending, without making an HTTP call.

Trait implementations

  • Clone (derived)
  • Default (derived)
  • PartialEq (derived)
  • Serialize (derived)
  • impl<'de> Deserialize<'de> for DecisionContent
  • impl std::fmt::Debug for DecisionContent

On this page