pub struct ValidationService { /* private fields */ }Expand description
Main validation service
Implementations§
Source§impl ValidationService
impl ValidationService
Sourcepub fn validate(
&self,
input: &str,
input_type: InputType,
) -> ValidationResult<()>
pub fn validate( &self, input: &str, input_type: InputType, ) -> ValidationResult<()>
Validate input based on type
Sourcepub fn validate_entity_name(&self, name: &str) -> ValidationResult<()>
pub fn validate_entity_name(&self, name: &str) -> ValidationResult<()>
Validate entity name (channel, group, project names)
Sourcepub fn validate_display_name(&self, name: &str) -> ValidationResult<()>
pub fn validate_display_name(&self, name: &str) -> ValidationResult<()>
Validate display name
Sourcepub fn validate_message(&self, message: &str) -> ValidationResult<()>
pub fn validate_message(&self, message: &str) -> ValidationResult<()>
Validate message content
Sourcepub fn validate_thread_reply(&self, reply: &str) -> ValidationResult<()>
pub fn validate_thread_reply(&self, reply: &str) -> ValidationResult<()>
Validate thread reply content (same rules as messages)
Sourcepub fn validate_password(&self, password: &str) -> ValidationResult<()>
pub fn validate_password(&self, password: &str) -> ValidationResult<()>
Validate password
Sourcepub fn sanitize(&self, input: &str, input_type: InputType) -> String
pub fn sanitize(&self, input: &str, input_type: InputType) -> String
Sanitize input by trimming whitespace
Sourcepub fn validate_and_sanitize(
&self,
input: &str,
input_type: InputType,
) -> ValidationResult<String>
pub fn validate_and_sanitize( &self, input: &str, input_type: InputType, ) -> ValidationResult<String>
Validate and sanitize input in one step
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ValidationService
impl RefUnwindSafe for ValidationService
impl Send for ValidationService
impl Sync for ValidationService
impl Unpin for ValidationService
impl UnwindSafe for ValidationService
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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