pub struct SchemaResourceBuilder { /* private fields */ }Expand description
Builder for creating resource handlers with fluent API
Implementations§
Source§impl SchemaResourceBuilder
impl SchemaResourceBuilder
pub fn new(schema: Schema) -> Self
pub fn with_getter<F>(self, attribute: &str, getter: F) -> Self
pub fn with_setter<F>(self, attribute: &str, setter: F) -> Self
pub fn with_transformer<F>(self, attribute: &str, transformer: F) -> Self
pub fn with_custom_method<F>(self, method_name: &str, method: F) -> Self
pub fn with_mapper(self, mapper: Arc<dyn SchemaMapper>) -> Self
pub fn with_database_mapping( self, table_name: &str, column_mappings: HashMap<String, String>, ) -> Self
pub fn build(self) -> ResourceHandler
Auto Trait Implementations§
impl Freeze for SchemaResourceBuilder
impl !RefUnwindSafe for SchemaResourceBuilder
impl Send for SchemaResourceBuilder
impl Sync for SchemaResourceBuilder
impl Unpin for SchemaResourceBuilder
impl !UnwindSafe for SchemaResourceBuilder
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
Source§impl<T> TenantValidator for T
impl<T> TenantValidator for T
Source§fn validate_tenant_context(
&self,
expected_tenant_id: &str,
context: &RequestContext,
) -> Result<(), String>
fn validate_tenant_context( &self, expected_tenant_id: &str, context: &RequestContext, ) -> Result<(), String>
Validate that the context has the expected tenant.
Source§fn validate_single_tenant_context(
&self,
context: &RequestContext,
) -> Result<(), String>
fn validate_single_tenant_context( &self, context: &RequestContext, ) -> Result<(), String>
Validate that the context is for single-tenant operation.
Source§fn require_tenant_context(&self, context: &RequestContext) -> Result<(), String>
fn require_tenant_context(&self, context: &RequestContext) -> Result<(), String>
Extract tenant context or return error for multi-tenant operations.