pub trait ResolveWithOpenAPI<T> {
// Required method
fn resolve<'a>(
&'a self,
openapi: &'a OpenAPI,
) -> Result<&'a T, ResolveError>;
}Expand description
Resolves a ReferenceOr<T> (or its boxed variant) to the item it denotes.
Required Methods§
Sourcefn resolve<'a>(&'a self, openapi: &'a OpenAPI) -> Result<&'a T, ResolveError>
fn resolve<'a>(&'a self, openapi: &'a OpenAPI) -> Result<&'a T, ResolveError>
Returns the inline item, or the item the $ref points at.
The result borrows from whichever of the two arguments it came from, so
its lifetime is the shorter of them: resolving out of a temporary
ReferenceOr yields a borrow that cannot outlive that temporary, even
when the value in fact came from openapi.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".