Skip to main content

ServicePublisher

Trait ServicePublisher 

Source
pub trait ServicePublisher:
    Send
    + Sync
    + Debug {
    // Required method
    fn publish(
        &self,
        subject: &str,
        envelope: &MessageEnvelope,
        operation: &str,
    ) -> Result<(), ServiceEffectError>;
}
Expand description

Publishes one service message on a subject, once per operation.

Required Methods§

Source

fn publish( &self, subject: &str, envelope: &MessageEnvelope, operation: &str, ) -> Result<(), ServiceEffectError>

Publishes envelope on subject with operation as its idempotency key.

§Errors

The publish was refused or failed, by name.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§