Skip to main content

MessageBusExternalIngress

Trait MessageBusExternalIngress 

Source
pub trait MessageBusExternalIngress {
    // Required methods
    fn is_closed(&self) -> bool;
    fn take_receiver(&mut self) -> Result<MessageBusExternalReceiver>;
    fn close(&mut self);
}
Expand description

External ingress surface for serialized message bus publications.

The live bridge consumes each inbound BusMessage as a topic and serialized payload. The receiver can be taken only once so ingress can hand ownership of the external stream to the bridge without exposing concrete backing details.

Required Methods§

Source

fn is_closed(&self) -> bool

Returns true if ingress has been closed.

Source

fn take_receiver(&mut self) -> Result<MessageBusExternalReceiver>

Takes the inbound message receiver for live bridge consumption.

§Errors

Returns an error if the receiver has already been taken or is unavailable.

Source

fn close(&mut self)

Closes ingress and stops accepting inbound messages.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§