pub struct TypedExtractorBuilder { /* private fields */ }Expand description
Builder for creating typed parameter extractors with validation
Implementations§
Source§impl TypedExtractorBuilder
impl TypedExtractorBuilder
Sourcepub fn new(pattern: RoutePattern) -> Self
pub fn new(pattern: RoutePattern) -> Self
Create a new builder for the given route pattern
Sourcepub fn constraint(self, param_name: &str, constraint: ParamConstraint) -> Self
pub fn constraint(self, param_name: &str, constraint: ParamConstraint) -> Self
Add a custom constraint for a parameter
Sourcepub fn uuid_param(self, param_name: &str) -> Self
pub fn uuid_param(self, param_name: &str) -> Self
Add a UUID constraint
Sourcepub fn alpha_param(self, param_name: &str) -> Self
pub fn alpha_param(self, param_name: &str) -> Self
Add an alphabetic constraint
Sourcepub fn slug_param(self, param_name: &str) -> Self
pub fn slug_param(self, param_name: &str) -> Self
Add a slug constraint
Sourcepub fn build(self) -> ParameterExtractor
pub fn build(self) -> ParameterExtractor
Build the parameter extractor
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TypedExtractorBuilder
impl RefUnwindSafe for TypedExtractorBuilder
impl Send for TypedExtractorBuilder
impl Sync for TypedExtractorBuilder
impl Unpin for TypedExtractorBuilder
impl UnwindSafe for TypedExtractorBuilder
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