pub struct Rep0 { /* private fields */ }Expand description
Reply half of request/reply pattern. See nng_rep.
Implementations§
Trait Implementations§
Source§impl AsyncSocket for Rep0
impl AsyncSocket for Rep0
Source§type ContextType = ReplyAsyncHandle
type ContextType = ReplyAsyncHandle
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 Rep0
impl AsyncStream for Rep0
Source§type ContextType = ReplyStreamHandle
type ContextType = ReplyStreamHandle
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 Rep0
impl GetSocket for Rep0
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 Rep0
impl Listen for Rep0
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 Rep0
impl RecvSocket for Rep0
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 SendSocket for Rep0
impl SendSocket for Rep0
Source§fn send_zerocopy(&self, data: Alloc) -> Result<(), SendError<Alloc>>
fn send_zerocopy(&self, data: Alloc) -> Result<(), SendError<Alloc>>
Sends data in “zero-copy” mode. See
NNG_FLAG_ALLOC.Auto Trait Implementations§
impl Freeze for Rep0
impl RefUnwindSafe for Rep0
impl Send for Rep0
impl Sync for Rep0
impl Unpin for Rep0
impl UnwindSafe for Rep0
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