pub fn get<T: DeserializeOwned>(resource: Option<&Resource>) -> Result<T, Error>Expand description
Deserializes a resource’s JSON representation into a typed value.
Works for both the composite resource (XR) and composed resources - both
are represented by Resource. Pass
request::observed_composite for
the observed XR, or
request::observed_composed for an
observed composed resource; desired resources work the same way. Returns
Error::MissingResource when resource is None or has no JSON
representation set, for example a composed resource Crossplane has not
yet observed.