pub struct MultiReviewChannel { /* private fields */ }Expand description
A ReviewChannel that dispatches to multiple inner channels.
For request_interaction, channels are tried sequentially — the first
successful response is returned. For notify, all channels receive the
notification (fan-out). Failures on individual channels are logged but
don’t prevent delivery to remaining channels.
Implementations§
Source§impl MultiReviewChannel
impl MultiReviewChannel
Sourcepub fn new(
channels: Vec<Box<dyn ReviewChannel>>,
strategy: MultiChannelStrategy,
) -> Self
pub fn new( channels: Vec<Box<dyn ReviewChannel>>, strategy: MultiChannelStrategy, ) -> Self
Create a new multi-channel from inner channels.
§Panics
Panics if channels is empty — use a single channel directly instead.
Sourcepub fn single(channel: Box<dyn ReviewChannel>) -> Self
pub fn single(channel: Box<dyn ReviewChannel>) -> Self
Wrap a single channel (no-op wrapper for uniform handling).
Sourcepub fn strategy(&self) -> &MultiChannelStrategy
pub fn strategy(&self) -> &MultiChannelStrategy
The configured dispatch strategy.
Sourcepub fn inner_channel_ids(&self) -> Vec<&str>
pub fn inner_channel_ids(&self) -> Vec<&str>
Channel IDs of all inner channels.
Trait Implementations§
Source§impl ReviewChannel for MultiReviewChannel
impl ReviewChannel for MultiReviewChannel
Source§fn request_interaction(
&self,
request: &InteractionRequest,
) -> Result<InteractionResponse, ReviewChannelError>
fn request_interaction( &self, request: &InteractionRequest, ) -> Result<InteractionResponse, ReviewChannelError>
Send an interaction request to the human and await their response. Read more
Source§fn notify(&self, notification: &Notification) -> Result<(), ReviewChannelError>
fn notify(&self, notification: &Notification) -> Result<(), ReviewChannelError>
Non-blocking notification to the human. Read more
Source§fn capabilities(&self) -> ChannelCapabilities
fn capabilities(&self) -> ChannelCapabilities
What this channel supports (async responses, rich media, threads, etc.).
Source§fn channel_id(&self) -> &str
fn channel_id(&self) -> &str
Channel identity string for audit trail (e.g., “terminal:tty0”, “slack:C04ABC”).
Auto Trait Implementations§
impl Freeze for MultiReviewChannel
impl !RefUnwindSafe for MultiReviewChannel
impl Send for MultiReviewChannel
impl Sync for MultiReviewChannel
impl Unpin for MultiReviewChannel
impl UnsafeUnpin for MultiReviewChannel
impl !UnwindSafe for MultiReviewChannel
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