pub struct ProtocolNegotiator { /* private fields */ }Expand description
Version and capability negotiator
Implementations§
Source§impl ProtocolNegotiator
impl ProtocolNegotiator
pub fn new(service_id: Uuid) -> Self
Sourcepub fn negotiate(&self, client_info: ClientInfo) -> Result<NegotiationResult>
pub fn negotiate(&self, client_info: ClientInfo) -> Result<NegotiationResult>
Negotiate protocol version and capabilities with a client
Sourcepub fn create_ready_event(&self, result: &NegotiationResult) -> Event
pub fn create_ready_event(&self, result: &NegotiationResult) -> Event
Create a Ready event after successful negotiation
Sourcepub fn get_available_capabilities(&self) -> &[String]
pub fn get_available_capabilities(&self) -> &[String]
Get available capabilities
Sourcepub fn supports_capability(&self, capability: &str) -> bool
pub fn supports_capability(&self, capability: &str) -> bool
Check if a specific capability is supported
Sourcepub fn get_service_metadata(&self) -> &HashMap<String, String>
pub fn get_service_metadata(&self) -> &HashMap<String, String>
Get service metadata
Auto Trait Implementations§
impl Freeze for ProtocolNegotiator
impl RefUnwindSafe for ProtocolNegotiator
impl Send for ProtocolNegotiator
impl Sync for ProtocolNegotiator
impl Unpin for ProtocolNegotiator
impl UnsafeUnpin for ProtocolNegotiator
impl UnwindSafe for ProtocolNegotiator
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