pub struct OpenApiRegistry { /* private fields */ }Expand description
OpenAPI runtime registry.
Implementations§
Source§impl OpenApiRegistry
impl OpenApiRegistry
Sourcepub fn new(config: OpenApiConfig) -> Self
pub fn new(config: OpenApiConfig) -> Self
Creates a new OpenApiRegistry
Sourcepub fn register_route(
&self,
method: &Method,
path: &str,
cfg: &OpenApiRouteConfig,
)
pub fn register_route( &self, method: &Method, path: &str, cfg: &OpenApiRouteConfig, )
Registers a route in the OpenAPI registry.
Sourcepub fn rebind_route(
&self,
method: &Method,
path: &str,
cfg: &OpenApiRouteConfig,
)
pub fn rebind_route( &self, method: &Method, path: &str, cfg: &OpenApiRouteConfig, )
Rebinds route to another spec.
Sourcepub fn apply_route_config(
&self,
method: &Method,
path: &str,
cfg: &OpenApiRouteConfig,
)
pub fn apply_route_config( &self, method: &Method, path: &str, cfg: &OpenApiRouteConfig, )
Applies route configuration
Sourcepub fn document_by_name(&self, name: &str) -> Option<OpenApiDocument>
pub fn document_by_name(&self, name: &str) -> Option<OpenApiDocument>
Returns OpenAPI document by spec name.
Sourcepub fn specs(&self) -> &[OpenApiSpec]
pub fn specs(&self) -> &[OpenApiSpec]
Returns a list of defined specs
Trait Implementations§
Source§impl Clone for OpenApiRegistry
impl Clone for OpenApiRegistry
Source§fn clone(&self) -> OpenApiRegistry
fn clone(&self) -> OpenApiRegistry
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 OpenApiRegistry
impl RefUnwindSafe for OpenApiRegistry
impl Send for OpenApiRegistry
impl Sync for OpenApiRegistry
impl Unpin for OpenApiRegistry
impl UnsafeUnpin for OpenApiRegistry
impl UnwindSafe for OpenApiRegistry
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