pub struct CatalogModule { /* private fields */ }Expand description
Catalog module configuration
Use the builder pattern to configure and register this module. For any real
deployment, mount the guarded router — read-only base + validated writes via
CatalogWriteService. The unguarded full-CRUD surface (all_crud_routes) is
gated behind the default-off unguarded cargo feature, for trusted/admin/seeding
use only.
let catalog = CatalogModule::builder()
.with_database(pool.clone())
.build()?;
// Production: validated writes + read-only base (the default, safe surface).
let router = create_guarded_catalog_routes(&catalog);
// Trusted/admin/seeding only — opt in with `--features unguarded`:
// let admin = catalog.all_crud_routes();Implementations§
Source§impl CatalogModule
impl CatalogModule
Sourcepub fn builder() -> CatalogModuleBuilder
pub fn builder() -> CatalogModuleBuilder
Create a new module builder
Auto Trait Implementations§
impl !RefUnwindSafe for CatalogModule
impl !UnwindSafe for CatalogModule
impl Freeze for CatalogModule
impl Send for CatalogModule
impl Sync for CatalogModule
impl Unpin for CatalogModule
impl UnsafeUnpin for CatalogModule
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more