pub struct Registry { /* private fields */ }Expand description
Keeps track of components during schema generation.
Implementations§
Source§impl Registry
impl Registry
pub fn register_schema<T: ToSchema + ?Sized>(&mut self) -> Ref
pub fn resolve_schema<'a>( &'a self, schema: &'a MaybeRef<Schema>, ) -> Option<&'a Schema>
pub fn schema_by_name(&self, name: &str) -> Option<&MaybeRef<Schema>>
pub fn components(&self) -> &Components
pub fn components_mut(&mut self) -> &mut Components
pub fn openapi_mut(&mut self) -> &mut OpenApi
pub fn into_openapi(self) -> OpenApi
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Registry
impl RefUnwindSafe for Registry
impl Send for Registry
impl Sync for Registry
impl Unpin for Registry
impl UnsafeUnpin for Registry
impl UnwindSafe for Registry
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