Struct Pull0

Source
pub struct Pull0 { /* private fields */ }
Expand description

Pull half of push/pull (“pipeline”) pattern. See nng_pull.

Implementations§

Source§

impl Pull0

Source

pub fn open() -> Result<Self>

Create a pull socket. See nng_pull_open.

Trait Implementations§

Source§

impl AsyncSocket for Pull0

Source§

type ContextType = PullAsyncHandle

The type of aynchronous context produced
Source§

fn create_async(&self) -> Result<Self::ContextType>

Turns the Socket into an asynchronous context
Source§

impl AsyncStream for Pull0

Source§

type ContextType = PullAsyncStream

The type of aynchronous context produced
Source§

fn create_async_stream(&self, buffer: usize) -> Result<Self::ContextType>

Turns the Socket into an asynchronous context
Source§

impl Clone for Pull0

Source§

fn clone(&self) -> Pull0

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Pull0

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Dial for Pull0

Source§

fn dial(&mut self, url: &str) -> Result<&mut Self>

Dial socket specified by URL. See nng_dial
Source§

fn dial_flags(&mut self, url: &str, flags: SocketFlags) -> Result<&mut Self>

Dial socket specified by URL. See nng_dial
Source§

fn dialer_create(&self, url: &str) -> Result<NngDialer>

Source§

impl GetOpts for Pull0

Source§

fn get_bool(&self, option: NngOption) -> Result<bool>

Get bool option. See #get_bool

Source§

fn get_int(&self, option: NngOption) -> Result<i32>

Get i32 option. See #get_int

Source§

fn get_ms(&self, option: NngOption) -> Result<i32>

Get nng_duration option. See #get_ms

Source§

fn get_size(&self, option: NngOption) -> Result<usize>

Get usize option. See #get_size

Source§

fn get_uint64(&self, option: NngOption) -> Result<u64>

Get u64 option. See #get_uint64

Source§

fn get_string(&self, option: NngOption) -> Result<NngString>

Get NngString option. See #get_string

Source§

impl GetSocket for Pull0

Source§

fn socket(&self) -> &NngSocket

Obtain underlying NngSocket.
Source§

fn socket_mut(&mut self) -> &mut NngSocket

Source§

unsafe fn nng_socket(&self) -> nng_socket

Obtain underlying nng_socket.
Source§

impl Listen for Pull0

Source§

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>

Listen for connections to specified URL. See nng_listen.
Source§

fn listener_create(&self, url: &str) -> Result<NngListener>

Source§

impl RecvSocket for Pull0

Source§

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]>

Receive data with Flags. Lifetime of return value is same as input buffer.
Source§

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>

Receive data in “zero-copy” mode with Flags.
Source§

fn recvmsg(&self) -> Result<NngMsg>

Receive a NngMsg: recvmsg_flags(..., 0)
Source§

fn recvmsg_flags(&self, flags: Flags) -> Result<NngMsg>

Receive a NngMsg with Flags. See nng_recvmsg.
Source§

impl SetOpts for Pull0

Source§

fn set_bool(&mut self, option: NngOption, value: bool) -> Result<&mut Self>

Set bool NngOption. See #set_bool

Source§

fn set_int(&mut self, option: NngOption, value: i32) -> Result<&mut Self>

See #set_int

Source§

fn set_ms(&mut self, option: NngOption, value: i32) -> Result<&mut Self>

See #set_ms

Source§

fn set_size(&mut self, option: NngOption, value: usize) -> Result<&mut Self>

See #set_size

Source§

fn set_uint64(&mut self, option: NngOption, value: u64) -> Result<&mut Self>

See #set_uint64

Source§

fn set_string(&mut self, option: NngOption, value: &str) -> Result<&mut Self>

See #set_string

Source§

fn set_duration( &mut self, option: NngOption, value: Duration, ) -> Result<&mut Self>

Source§

impl Socket for Pull0

Source§

fn with<T>(self, setup: T) -> Result<Self>
where T: FnOnce(&mut Self) -> Result<&mut Self>,

Helper to chain constructors with methods that return &Self. Read more

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.