pub struct MessageBus<T = AnyValue> {
pub commands: Node<MessageBusCommand<T>>,
pub messages: Node<MessageEnvelope<T>>,
pub status: Node<MessageBusStatus>,
pub issues: Node<DataIssue>,
/* private fields */
}Expand description
MessageBus data container.
Fields§
§commands: Node<MessageBusCommand<T>>commands field for commands.
messages: Node<MessageEnvelope<T>>messages field for messages.
status: Node<MessageBusStatus>status field for status.
issues: Node<DataIssue>issues field for issues.
Implementations§
Source§impl<T: Clone + 'static> MessageBus<T>
impl<T: Clone + 'static> MessageBus<T>
Sourcepub fn new(
graph: &Graph,
topics: impl IntoIterator<Item = impl Into<String>>,
) -> Self
pub fn new( graph: &Graph, topics: impl IntoIterator<Item = impl Into<String>>, ) -> Self
Creates or computes new.
Sourcepub fn with_options(graph: &Graph, opts: MessageBusOptions) -> Self
pub fn with_options(graph: &Graph, opts: MessageBusOptions) -> Self
Creates or computes with_options.
Sourcepub fn ensure_topic(
&self,
topic: impl Into<String>,
command_id: Option<String>,
) -> MessageBusCommand<T>
pub fn ensure_topic( &self, topic: impl Into<String>, command_id: Option<String>, ) -> MessageBusCommand<T>
Updates or reads ensure_topic.
Sourcepub fn close_topic(
&self,
topic: impl Into<String>,
command_id: Option<String>,
) -> MessageBusCommand<T>
pub fn close_topic( &self, topic: impl Into<String>, command_id: Option<String>, ) -> MessageBusCommand<T>
Updates or reads close_topic.
Sourcepub fn publish(
&self,
topic: impl Into<String>,
payload: T,
key: Option<String>,
command_id: Option<String>,
idempotency_key: Option<String>,
) -> MessageBusCommand<T>
pub fn publish( &self, topic: impl Into<String>, payload: T, key: Option<String>, command_id: Option<String>, idempotency_key: Option<String>, ) -> MessageBusCommand<T>
Updates or reads publish.
Sourcepub fn set_topic_policy(
&self,
topic_policy: MessageBusTopicPolicy,
command_id: Option<String>,
) -> MessageBusCommand<T>
pub fn set_topic_policy( &self, topic_policy: MessageBusTopicPolicy, command_id: Option<String>, ) -> MessageBusCommand<T>
Updates or reads set_topic_policy.
Sourcepub fn topic(&self, topic: impl Into<String>) -> MessageBusTopicProjection<T>
pub fn topic(&self, topic: impl Into<String>) -> MessageBusTopicProjection<T>
Updates or reads topic.
Sourcepub fn topic_named(
&self,
topic: impl Into<String>,
name: Option<impl Into<String>>,
) -> MessageBusTopicProjection<T>
pub fn topic_named( &self, topic: impl Into<String>, name: Option<impl Into<String>>, ) -> MessageBusTopicProjection<T>
Updates or reads topic_named.
Sourcepub fn catalog(&self) -> MessageBusPullProjection<MessageBusCatalogPage>
pub fn catalog(&self) -> MessageBusPullProjection<MessageBusCatalogPage>
Updates or reads catalog.
Sourcepub fn catalog_named(
&self,
name: Option<impl Into<String>>,
) -> MessageBusPullProjection<MessageBusCatalogPage>
pub fn catalog_named( &self, name: Option<impl Into<String>>, ) -> MessageBusPullProjection<MessageBusCatalogPage>
Updates or reads catalog_named.
Sourcepub fn dead_letter(
&self,
) -> MessageBusPullProjection<MessageBusDeadLetterPage<T>>
pub fn dead_letter( &self, ) -> MessageBusPullProjection<MessageBusDeadLetterPage<T>>
Updates or reads dead_letter.
Sourcepub fn dead_letter_named(
&self,
name: Option<impl Into<String>>,
) -> MessageBusPullProjection<MessageBusDeadLetterPage<T>>
pub fn dead_letter_named( &self, name: Option<impl Into<String>>, ) -> MessageBusPullProjection<MessageBusDeadLetterPage<T>>
Updates or reads dead_letter_named.
Sourcepub fn subscription(
&self,
opts: MessageBusSubscriptionOptions,
) -> MessageBusSubscription<T>
pub fn subscription( &self, opts: MessageBusSubscriptionOptions, ) -> MessageBusSubscription<T>
Updates or reads subscription.
Trait Implementations§
Source§impl<T: Clone> Clone for MessageBus<T>
impl<T: Clone> Clone for MessageBus<T>
Source§fn clone(&self) -> MessageBus<T>
fn clone(&self) -> MessageBus<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<T> Freeze for MessageBus<T>
impl<T = Rc<dyn Any>> !RefUnwindSafe for MessageBus<T>
impl<T = Rc<dyn Any>> !Send for MessageBus<T>
impl<T = Rc<dyn Any>> !Sync for MessageBus<T>
impl<T> Unpin for MessageBus<T>where
T: Unpin,
impl<T> UnsafeUnpin for MessageBus<T>
impl<T = Rc<dyn Any>> !UnwindSafe for MessageBus<T>
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