pub struct OpenApiRuntime { /* private fields */ }Expand description
Loaded OpenAPI runtime.
Implementations§
Source§impl OpenApiRuntime
impl OpenApiRuntime
Sourcepub fn from_path(path: &Path) -> Result<Self, RuntimeError>
pub fn from_path(path: &Path) -> Result<Self, RuntimeError>
Load OpenAPI document from path.
The file is loaded, all $ref nodes are resolved via RefResolver,
and the fully-inlined document is then parsed into operation specs.
Sourcepub fn from_resolved(root: Value) -> Result<Self, RuntimeError>
pub fn from_resolved(root: Value) -> Result<Self, RuntimeError>
Build from an already-resolved OpenAPI document value.
The caller must ensure that all $ref nodes have been inlined before
invoking this constructor.
Sourcepub fn match_operation<'a>(
&'a self,
method: &Method,
path: &str,
) -> Option<MatchedOperation<'a>>
pub fn match_operation<'a>( &'a self, method: &Method, path: &str, ) -> Option<MatchedOperation<'a>>
Match operation by method and path.
Trait Implementations§
Source§impl Clone for OpenApiRuntime
impl Clone for OpenApiRuntime
Source§fn clone(&self) -> OpenApiRuntime
fn clone(&self) -> OpenApiRuntime
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for OpenApiRuntime
impl RefUnwindSafe for OpenApiRuntime
impl Send for OpenApiRuntime
impl Sync for OpenApiRuntime
impl Unpin for OpenApiRuntime
impl UnsafeUnpin for OpenApiRuntime
impl UnwindSafe for OpenApiRuntime
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request