pub struct ChannelRegistry { /* private fields */ }Implementations§
Source§impl ChannelRegistry
impl ChannelRegistry
pub fn new() -> Self
pub fn with_builtin_handlers() -> Self
pub fn register(&mut self, channel: Arc<dyn Channel>)
pub fn get(&self, name: &str) -> Option<Arc<dyn Channel>>
pub fn has_channel(&self, name: &str) -> bool
pub fn channel_names(&self) -> Vec<&str>
pub fn all_channels(&self) -> Vec<Arc<dyn Channel>>
Sourcepub async fn dispatch(
&self,
channel: &str,
payload: Value,
) -> Option<ChannelDelivery>
pub async fn dispatch( &self, channel: &str, payload: Value, ) -> Option<ChannelDelivery>
Dispatch a message to a channel. If boundary is "local_only", only
local channels (CLI, transcription) are allowed; non-local targets are
rejected with accepted: false.
Sourcepub async fn dispatch_with_boundary(
&self,
channel: &str,
payload: Value,
boundary: &str,
) -> Option<ChannelDelivery>
pub async fn dispatch_with_boundary( &self, channel: &str, payload: Value, boundary: &str, ) -> Option<ChannelDelivery>
Dispatch with an explicit privacy boundary check.
Trait Implementations§
Source§impl Default for ChannelRegistry
impl Default for ChannelRegistry
Source§fn default() -> ChannelRegistry
fn default() -> ChannelRegistry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ChannelRegistry
impl !RefUnwindSafe for ChannelRegistry
impl Send for ChannelRegistry
impl Sync for ChannelRegistry
impl Unpin for ChannelRegistry
impl UnsafeUnpin for ChannelRegistry
impl !UnwindSafe for ChannelRegistry
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