pub struct ValidationMessageProcessor;Expand description
A message processor that validates messages
This processor validates incoming and outgoing DIDComm messages to ensure they conform to the expected structure and protocol requirements.
In a production implementation, this would perform comprehensive validation including:
- Field validation (required fields, format, values)
- Protocol compliance checks for each message type
- Signature verification
- Timestamp and expiration checks
- Security and authorization checks
§Implementation
Currently, this implementation validates:
- The message ID is not empty
- The message type is not empty
- Any ‘from’ or ‘to’ DIDs follow the ‘did:’ prefix format
- Basic protocol-specific requirements based on message type
§Message Flow
The validator sits in the message processor pipeline and can filter out invalid messages by returning Ok(None), or let valid messages continue through the pipeline by returning Ok(Some(message)).
Trait Implementations§
Source§impl Clone for ValidationMessageProcessor
impl Clone for ValidationMessageProcessor
Source§fn clone(&self) -> ValidationMessageProcessor
fn clone(&self) -> ValidationMessageProcessor
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ValidationMessageProcessor
impl Debug for ValidationMessageProcessor
Source§impl MessageProcessor for ValidationMessageProcessor
impl MessageProcessor for ValidationMessageProcessor
Auto Trait Implementations§
impl Freeze for ValidationMessageProcessor
impl RefUnwindSafe for ValidationMessageProcessor
impl Send for ValidationMessageProcessor
impl Sync for ValidationMessageProcessor
impl Unpin for ValidationMessageProcessor
impl UnwindSafe for ValidationMessageProcessor
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