pub struct StreamingProtocolRegistry { /* private fields */ }
Expand description
A registry for managing multiple streaming protocol handlers
Implementations§
Source§impl StreamingProtocolRegistry
impl StreamingProtocolRegistry
Sourcepub fn register_handler(
&mut self,
protocol: Protocol,
handler: Arc<dyn StreamingProtocol>,
)
pub fn register_handler( &mut self, protocol: Protocol, handler: Arc<dyn StreamingProtocol>, )
Register a streaming protocol handler
Sourcepub fn get_handler(
&self,
protocol: &Protocol,
) -> Option<&Arc<dyn StreamingProtocol>>
pub fn get_handler( &self, protocol: &Protocol, ) -> Option<&Arc<dyn StreamingProtocol>>
Get a handler for a specific protocol
Sourcepub fn registered_protocols(&self) -> Vec<Protocol>
pub fn registered_protocols(&self) -> Vec<Protocol>
Get all registered protocols
Sourcepub fn supports_protocol(&self, protocol: &Protocol) -> bool
pub fn supports_protocol(&self, protocol: &Protocol) -> bool
Check if a protocol is supported
Trait Implementations§
Auto Trait Implementations§
impl Freeze for StreamingProtocolRegistry
impl !RefUnwindSafe for StreamingProtocolRegistry
impl Send for StreamingProtocolRegistry
impl Sync for StreamingProtocolRegistry
impl Unpin for StreamingProtocolRegistry
impl !UnwindSafe for StreamingProtocolRegistry
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