[][src]Struct zmq::Message

pub struct Message { /* fields omitted */ }

Holds a 0MQ message.

A message is a single frame, either received or created locally and then sent over the wire. Multipart messages are transmitted as multiple Messages.

In rust-zmq, you aren't required to create message objects if you use the convenience APIs provided (e.g. Socket::recv_bytes() or Socket::send_str()). However, using message objects can make multiple operations in a loop more efficient, since allocated memory can be reused.

Methods

impl Message
[src]

Create an empty Message.

Create a Message preallocated with len uninitialized bytes.

Create a Message with space for len bytes that are initialized to 0.

Create a Message from a &[u8]. This will copy data into the message.

Return the message content as a string slice if it is valid UTF-8.

Return the ZMQ_MORE flag, which indicates if more parts of a multipart message will follow.

Query a message metadata property.

Trait Implementations

impl Drop for Message
[src]

Executes the destructor for this type. Read more

impl Eq for Message
[src]

impl PartialEq<Message> for Message
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Debug for Message
[src]

Formats the value using the given formatter. Read more

impl Deref for Message
[src]

The resulting type after dereferencing.

Dereferences the value.

impl DerefMut for Message
[src]

Mutably dereferences the value.

Auto Trait Implementations

impl Send for Message

impl Sync for Message

Blanket Implementations

impl<T> From for T
[src]

Performs the conversion.

impl<T, U> Into for T where
    U: From<T>, 
[src]

Performs the conversion.

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

impl<T> Borrow for T where
    T: ?Sized
[src]

Immutably borrows from an owned value. Read more

impl<T> Any for T where
    T: 'static + ?Sized
[src]

🔬 This is a nightly-only experimental API. (get_type_id)

this method will likely be replaced by an associated static

Gets the TypeId of self. Read more

impl<T> BorrowMut for T where
    T: ?Sized
[src]

Mutably borrows from an owned value. Read more

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.