pub struct OpenApi { /* private fields */ }Expand description
Serves Scalar UI and OpenAPI JSON from the compiled RouteTable.
Implementations§
Source§impl OpenApi
impl OpenApi
pub fn new(title: impl Into<String>, version: impl Into<String>) -> Self
pub fn server(self, url: impl Into<String>) -> Self
pub fn mount(self, path: impl Into<String>) -> Self
Sourcepub fn local_assets(self, dir: impl Into<PathBuf>) -> Self
pub fn local_assets(self, dir: impl Into<PathBuf>) -> Self
Prefer a local scalar.js next to the HTML (offline). CDN used when unset.
Trait Implementations§
Source§impl Plugin for OpenApi
impl Plugin for OpenApi
Source§fn id(&self) -> &'static str
fn id(&self) -> &'static str
Stable plugin identifier used for dependency checks and
crate::App::has_plugin. Read moreSource§fn meta(&self) -> PluginMeta
fn meta(&self) -> PluginMeta
Display name, description, and declared
PluginMeta::sdk version.Auto Trait Implementations§
impl Freeze for OpenApi
impl RefUnwindSafe for OpenApi
impl Send for OpenApi
impl Sync for OpenApi
impl Unpin for OpenApi
impl UnsafeUnpin for OpenApi
impl UnwindSafe for OpenApi
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