pub struct Bus0 { /* private fields */ }Expand description
Half of pair pattern. See nng_pair.
Implementations§
Trait Implementations§
Source§impl AsyncSocket for Bus0
impl AsyncSocket for Bus0
Source§type ContextType = BusAsyncHandle
type ContextType = BusAsyncHandle
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 GetSocket for Bus0
impl GetSocket for Bus0
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 Bus0
impl Listen for Bus0
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 Bus0
impl RecvSocket for Bus0
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 Bus0
impl SendSocket for Bus0
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 Bus0
impl RefUnwindSafe for Bus0
impl Send for Bus0
impl Sync for Bus0
impl Unpin for Bus0
impl UnsafeUnpin for Bus0
impl UnwindSafe for Bus0
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