pub struct NotificationValidator;
Expand description
Validates attributes describing a Notification message.
Trait Implementations§
Source§impl UAttributesValidator for NotificationValidator
impl UAttributesValidator for NotificationValidator
Source§fn validate(&self, attributes: &UAttributes) -> Result<(), UAttributesError>
fn validate(&self, attributes: &UAttributes) -> Result<(), UAttributesError>
Checks if a given set of attributes complies with the rules specified for notification messages.
§Errors
Returns an error if any of the following checks fail for the given attributes:
Source§fn validate_source(
&self,
attributes: &UAttributes,
) -> Result<(), UAttributesError>
fn validate_source( &self, attributes: &UAttributes, ) -> Result<(), UAttributesError>
Verifies that attributes for a notification message contain a source URI.
§Errors
Returns an error
- if the attributes do not contain a source URI, or
- if the source URI is an RPC response URI, or
- if the source URI contains any wildcards.
Source§fn validate_sink(
&self,
attributes: &UAttributes,
) -> Result<(), UAttributesError>
fn validate_sink( &self, attributes: &UAttributes, ) -> Result<(), UAttributesError>
Verifies that attributes for a notification message contain a sink URI.
§Errors
Returns an error
- if the attributes do not contain a sink URI, or
- if the sink URI’s resource ID is != 0, or
- if the sink URI contains any wildcards.
Source§fn message_type(&self) -> UMessageType
fn message_type(&self) -> UMessageType
Returns the type of message that this validator can be used with.
Source§fn validate_type(
&self,
attributes: &UAttributes,
) -> Result<(), UAttributesError>
fn validate_type( &self, attributes: &UAttributes, ) -> Result<(), UAttributesError>
Verifies that this validator is appropriate for a set of attributes. Read more
Source§fn validate_id(&self, attributes: &UAttributes) -> Result<(), UAttributesError>
fn validate_id(&self, attributes: &UAttributes) -> Result<(), UAttributesError>
Verifies that a set of attributes contains a valid message ID. Read more
Auto Trait Implementations§
impl Freeze for NotificationValidator
impl RefUnwindSafe for NotificationValidator
impl Send for NotificationValidator
impl Sync for NotificationValidator
impl Unpin for NotificationValidator
impl UnwindSafe for NotificationValidator
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