Type Alias Struct

Source
pub type Struct = Map<String, Value>;
Expand description

Protobuf (and consequently the Google Cloud APIs) use Struct to represent JSON objects. We need a type that can be referenced from the generated code.

Aliased Type§

struct Struct { /* private fields */ }

Trait Implementations§

Source§

impl Message for Struct

Source§

fn typename() -> &'static str

The typename of this message.
Source§

fn to_map(&self) -> Result<Map<String, Value>, AnyError>
where Self: Serialize + Sized,

Store the value into a JSON object.
Source§

fn from_map(map: &Map<String, Value>) -> Result<Self, AnyError>
where Self: DeserializeOwned,

Extract the value from a JSON object.