pub struct RequestValidator;
Expand description
Validate UAttributes
with type UMessageType::Request
Implementations§
Source§impl RequestValidator
impl RequestValidator
Sourcepub fn validate_ttl(
&self,
attributes: &UAttributes,
) -> Result<(), UAttributesError>
pub fn validate_ttl( &self, attributes: &UAttributes, ) -> Result<(), UAttributesError>
Verifies that a set of attributes representing an RPC request contain a valid time-to-live.
§Errors
Returns an error if UAttributes::ttl
(time-to-live) is empty or contains a value less than 1.
Trait Implementations§
Source§impl UAttributesValidator for RequestValidator
impl UAttributesValidator for RequestValidator
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 RPC request 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 message representing an RPC request contain a reply-to-address.
§Errors
Returns an error if the UAttributes::source
property does not contain a valid reply-to-address according to
UUri::verify_rpc_response
.
Source§fn validate_sink(
&self,
attributes: &UAttributes,
) -> Result<(), UAttributesError>
fn validate_sink( &self, attributes: &UAttributes, ) -> Result<(), UAttributesError>
Verifies that attributes for a message representing an RPC request indicate the method to invoke.
§Errors
Returns an erro if the UAttributes::sink
property does not contain a URI representing a method according to
UUri::verify_rpc_method
.