pub struct Pull0 { /* private fields */ }
Expand description
Pull half of push/pull (“pipeline”) pattern. See nng_pull.
Implementations§
Trait Implementations§
Source§impl AsyncSocket for Pull0
impl AsyncSocket for Pull0
Source§type ContextType = PullAsyncHandle
type ContextType = PullAsyncHandle
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 Pull0
impl AsyncStream for Pull0
Source§type ContextType = PullAsyncStream
type ContextType = PullAsyncStream
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 Pull0
impl GetSocket for Pull0
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 Pull0
impl Listen for Pull0
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 Pull0
impl RecvSocket for Pull0
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
.Auto Trait Implementations§
impl Freeze for Pull0
impl RefUnwindSafe for Pull0
impl Send for Pull0
impl Sync for Pull0
impl Unpin for Pull0
impl UnwindSafe for Pull0
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