pub struct ComposedMessageProvider { /* private fields */ }Expand description
A MessageProvider that combines two providers, draining both on each poll.
Messages from the primary provider are returned first, followed by those from the secondary provider.
Implementations§
Source§impl ComposedMessageProvider
impl ComposedMessageProvider
Sourcepub fn new(
primary: Arc<dyn MessageProvider>,
secondary: Arc<dyn MessageProvider>,
) -> Self
pub fn new( primary: Arc<dyn MessageProvider>, secondary: Arc<dyn MessageProvider>, ) -> Self
Create a composed provider from two providers.
Trait Implementations§
Source§impl MessageProvider for ComposedMessageProvider
impl MessageProvider for ComposedMessageProvider
Source§fn poll_steering(&self) -> Vec<AgentMessage>
fn poll_steering(&self) -> Vec<AgentMessage>
Return pending steering messages, if any. Read more
Source§fn poll_follow_up(&self) -> Vec<AgentMessage>
fn poll_follow_up(&self) -> Vec<AgentMessage>
Return pending follow-up messages, if any. Read more
Source§fn has_steering(&self) -> bool
fn has_steering(&self) -> bool
Non-draining check for pending steering messages. Read more
Auto Trait Implementations§
impl Freeze for ComposedMessageProvider
impl !RefUnwindSafe for ComposedMessageProvider
impl Send for ComposedMessageProvider
impl Sync for ComposedMessageProvider
impl Unpin for ComposedMessageProvider
impl UnsafeUnpin for ComposedMessageProvider
impl !UnwindSafe for ComposedMessageProvider
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