pub trait OApiExtensionExtractor {
// Required method
fn oapi_raw_ext(&self) -> &HashMap<String, Value>;
// Provided method
fn oapi_extract_ext<S>(
&self,
root: &SparseRoot<OApiDocument>,
key: &str,
) -> Result<S, OApiError>
where S: DeserializeOwned + SparsableTrait + Serialize + OApiCheckTrait { ... }
}
Expand description
Required Methods§
Sourcefn oapi_raw_ext(&self) -> &HashMap<String, Value>
fn oapi_raw_ext(&self) -> &HashMap<String, Value>
Return a map of value of the additionnal keys for that object
Provided Methods§
Sourcefn oapi_extract_ext<S>(
&self,
root: &SparseRoot<OApiDocument>,
key: &str,
) -> Result<S, OApiError>
fn oapi_extract_ext<S>( &self, root: &SparseRoot<OApiDocument>, key: &str, ) -> Result<S, OApiError>
Try to deserialize to the type S
the object at key
, providing the
root of the document for any SparsePointer dereferencing
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.