pub struct Sub0 { /* private fields */ }Expand description
Subscribe half of publisher/subscriber pattern. See nng_sub.
Implementations§
Trait Implementations§
Source§impl AsyncSocket for Sub0
impl AsyncSocket for Sub0
Source§type ContextType = SubscribeAsyncHandle
type ContextType = SubscribeAsyncHandle
The type of aynchronous context produced
Source§fn create_async(&self) -> Result<Self::ContextType>
fn create_async(&self) -> Result<Self::ContextType>
Turns the
Socket into an asynchronous contextSource§impl AsyncStream for Sub0
impl AsyncStream for Sub0
Source§type ContextType = SubscribeAsyncStream
type ContextType = SubscribeAsyncStream
The type of aynchronous context produced
Source§fn create_async_stream(&self, buffer: usize) -> Result<Self::ContextType>
fn create_async_stream(&self, buffer: usize) -> Result<Self::ContextType>
Turns the
Socket into an asynchronous contextSource§impl GetSocket for Sub0
impl GetSocket for Sub0
fn socket_mut(&mut self) -> &mut NngSocket
Source§unsafe fn nng_socket(&self) -> nng_socket
unsafe fn nng_socket(&self) -> nng_socket
Obtain underlying
nng_socket.Source§impl Listen for Sub0
impl Listen for Sub0
Source§fn listen(&mut self, url: &str) -> Result<&mut Self>
fn listen(&mut self, url: &str) -> Result<&mut Self>
Listen for connections to specified URL. See nng_listen.
Source§fn listen_flags(&mut self, url: &str, flags: SocketFlags) -> Result<&mut Self>
fn listen_flags(&mut self, url: &str, flags: SocketFlags) -> Result<&mut Self>
Listen for connections to specified URL. See nng_listen.
fn listener_create(&self, url: &str) -> Result<NngListener>
Source§impl RecvSocket for Sub0
impl RecvSocket for Sub0
Source§fn recv<'a>(&self, buffer: &'a mut [u8]) -> Result<&'a [u8]>
fn recv<'a>(&self, buffer: &'a mut [u8]) -> Result<&'a [u8]>
Receive data. See nng_recv.
Lifetime of return value is same as input buffer.
Source§fn recv_flags<'a>(&self, buffer: &'a mut [u8], flags: Flags) -> Result<&'a [u8]>
fn recv_flags<'a>(&self, buffer: &'a mut [u8], flags: Flags) -> Result<&'a [u8]>
Receive data with
Flags.
Lifetime of return value is same as input buffer.Source§fn recv_zerocopy(&self) -> Result<Alloc>
fn recv_zerocopy(&self) -> Result<Alloc>
Receive data in “zero-copy” mode. See
NNG_FLAG_ALLOC.Source§fn recv_zerocopy_flags(&self, flags: Flags) -> Result<Alloc>
fn recv_zerocopy_flags(&self, flags: Flags) -> Result<Alloc>
Receive data in “zero-copy” mode with
Flags.Source§impl SetOpts for Sub0
impl SetOpts for Sub0
Auto Trait Implementations§
impl Freeze for Sub0
impl RefUnwindSafe for Sub0
impl Send for Sub0
impl Sync for Sub0
impl Unpin for Sub0
impl UnwindSafe for Sub0
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