pub struct PublishValidator;Expand description
Validates attributes describing a Publish message.
Trait Implementations§
Source§impl Debug for PublishValidator
impl Debug for PublishValidator
Source§impl UAttributesValidator for PublishValidator
impl UAttributesValidator for PublishValidator
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 publish 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 publish message contain a valid source URI.
§Errors
Returns an error
- if the source URI contains any wildcards, or
- if the source URI has a resource ID of 0.
Source§fn validate_sink(
&self,
attributes: &UAttributes,
) -> Result<(), UAttributesError>
fn validate_sink( &self, attributes: &UAttributes, ) -> Result<(), UAttributesError>
Verifies that attributes for a publish message do not contain a sink URI.
§Errors
If the UAttributes::sink property contains any URI, an error is returned.
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
Auto Trait Implementations§
impl Freeze for PublishValidator
impl RefUnwindSafe for PublishValidator
impl Send for PublishValidator
impl Sync for PublishValidator
impl Unpin for PublishValidator
impl UnwindSafe for PublishValidator
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<TCore> UWithNativePrefixWire for TCore
impl<TCore> UWithNativePrefixWire for TCore
Source§fn into_native_prefix_wire_transport<W>(
self,
wire: W,
) -> UWireTransport<TCore, W, NativePrefixFrameMetadataCodec>where
W: UWire,
fn into_native_prefix_wire_transport<W>(
self,
wire: W,
) -> UWireTransport<TCore, W, NativePrefixFrameMetadataCodec>where
W: UWire,
Wraps this core with an external or custom selected wire using canonical metadata.
Source§fn into_protobuf_transport(
self,
) -> UWireTransport<TCore, ProtobufWire, NativePrefixFrameMetadataCodec>
fn into_protobuf_transport( self, ) -> UWireTransport<TCore, ProtobufWire, NativePrefixFrameMetadataCodec>
Wraps this core with the Protocol Buffers selected-wire profile.
Source§fn into_stable_container_transport(
self,
) -> UWireTransport<TCore, StableContainerWireFormat, NativePrefixFrameMetadataCodec>
fn into_stable_container_transport( self, ) -> UWireTransport<TCore, StableContainerWireFormat, NativePrefixFrameMetadataCodec>
Wraps this core with the stable-container selected-wire profile.