pub struct ConnectionRef<Transport: Sink<GsbMessage, Error = ProtocolError> + Unpin + 'static, H: CallRequestHandler + 'static>(/* private fields */);Implementations§
Source§impl<Transport: Sink<GsbMessage, Error = ProtocolError> + Unpin + 'static, H: CallRequestHandler + Unpin + 'static> ConnectionRef<Transport, H>
impl<Transport: Sink<GsbMessage, Error = ProtocolError> + Unpin + 'static, H: CallRequestHandler + Unpin + 'static> ConnectionRef<Transport, H>
pub fn bind( &self, addr: impl Into<String>, ) -> impl Future<Output = Result<(), Error>> + 'static
pub fn unbind( &self, addr: impl Into<String>, ) -> impl Future<Output = Result<(), Error>> + 'static
pub fn subscribe( &self, topic: impl Into<String>, ) -> impl Future<Output = Result<(), Error>> + 'static
pub fn unsubscribe( &self, topic: impl Into<String>, ) -> impl Future<Output = Result<(), Error>> + 'static
pub fn broadcast( &self, caller: impl Into<String>, topic: impl Into<String>, body: Vec<u8>, ) -> impl Future<Output = Result<(), Error>> + 'static
pub fn call( &self, caller: impl Into<String>, addr: impl Into<String>, body: impl Into<Vec<u8>>, no_reply: bool, ) -> impl Future<Output = Result<Vec<u8>, Error>>
pub fn call_streaming( &self, caller: impl Into<String>, addr: impl Into<String>, body: impl Into<Vec<u8>>, ) -> impl Stream<Item = Result<ResponseChunk, Error>>
pub fn connected(&self) -> bool
Trait Implementations§
Source§impl<Transport: Sink<GsbMessage, Error = ProtocolError> + Unpin + 'static, H: CallRequestHandler + 'static> Clone for ConnectionRef<Transport, H>
impl<Transport: Sink<GsbMessage, Error = ProtocolError> + Unpin + 'static, H: CallRequestHandler + 'static> Clone for ConnectionRef<Transport, H>
impl<Transport: Sink<GsbMessage, Error = ProtocolError> + Unpin + 'static, H: CallRequestHandler + 'static> Unpin for ConnectionRef<Transport, H>
Auto Trait Implementations§
impl<Transport, H> Freeze for ConnectionRef<Transport, H>
impl<Transport, H> !RefUnwindSafe for ConnectionRef<Transport, H>
impl<Transport, H> Send for ConnectionRef<Transport, H>
impl<Transport, H> Sync for ConnectionRef<Transport, H>
impl<Transport, H> !UnwindSafe for ConnectionRef<Transport, H>
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