pub struct OpenApiPlugin { /* private fields */ }Expand description
Pre-serialized zero-allocation OpenAPI server backing OpenapiHook.
Implementations§
Source§impl OpenApiPlugin
Pre-serialized wire serving methods for OpenApiPlugin.
impl OpenApiPlugin
Pre-serialized wire serving methods for OpenApiPlugin.
Sourcepub fn new(config: OpenApiConfig) -> Self
pub fn new(config: OpenApiConfig) -> Self
Sourcepub fn init(config: OpenApiConfig) -> &'static Self
pub fn init(config: OpenApiConfig) -> &'static Self
Initializes the global OpenApiPlugin singleton once.
§Arguments
OpenApiConfig- OpenAPI configuration.
§Returns
&'static Self- Reference to the global plugin.
Sourcepub fn get() -> Option<&'static Self>
pub fn get() -> Option<&'static Self>
Returns the initialized global OpenApiPlugin, if configured.
§Returns
Option<&'static Self>- Reference to the global plugin, orNone.
Sourcepub fn get_spec_etag(&self) -> &str
pub fn get_spec_etag(&self) -> &str
Sourcepub fn get_spec_wire(&self) -> &[u8] ⓘ
pub fn get_spec_wire(&self) -> &[u8] ⓘ
Sourcepub fn get_docs_wire(&self) -> &[u8] ⓘ
pub fn get_docs_wire(&self) -> &[u8] ⓘ
Trait Implementations§
Source§impl Clone for OpenApiPlugin
impl Clone for OpenApiPlugin
Auto Trait Implementations§
impl Forget for OpenApiPlugin
impl Freeze for OpenApiPluginwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<OpenApiServer>: Freeze,
*const LeafNode<String, BTreeMap<String, OpenApiOperation>> is !null: Freeze,
PhantomData<(Owned, LeafOrInternal)>: Freeze,
PhantomData<Box<(String, BTreeMap<String, OpenApiOperation>)>>: Freeze,
impl Move for OpenApiPlugin
impl RefUnwindSafe for OpenApiPlugin
impl Send for OpenApiPlugin
impl Sync for OpenApiPlugin
impl Unpin for OpenApiPlugin
impl UnsafeUnpin for OpenApiPluginwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<OpenApiServer>: UnsafeUnpin,
*const LeafNode<String, BTreeMap<String, OpenApiOperation>> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(String, BTreeMap<String, OpenApiOperation>)>>: UnsafeUnpin,
impl UnwindSafe for OpenApiPlugin
Blanket Implementations§
impl<T> AnySend for T
impl<T> AnySendClone for T
impl<T> AnySendSync for T
impl<T> AnySendSyncClone for T
impl<T> AnySync for T
impl<T> AnySyncClone for T
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