[][src]Struct tmq::Multipart

pub struct Multipart(_);

ZMQ multipart which holds individual messages.

It is implemented with a VecDeque to allow efficient popping from the beginning. This is useful both for async Read/Write implementations and for consuming the multipart.

Implementations

impl Multipart[src]

pub fn is_empty(&self) -> bool[src]

Returns true if the multipart contains no messages.

pub fn len(&self) -> usize[src]

Returns the number of messages in the multipart.

pub fn push_front(&mut self, item: Message)[src]

Adds a message to the front of the multipart.

pub fn pop_front(&mut self) -> Option<Message>[src]

Removes the first message from the multipart and returns it, or None if it is empty.

pub fn push_back(&mut self, item: Message)[src]

Adds a message to the back of the multipart.

pub fn pop_back(&mut self) -> Option<Message>[src]

Removes the last message from the multipart and returns it, or None if it is empty.

pub fn iter(&self) -> impl Iterator<Item = &Message>[src]

Creates an iterator which iterates through the messages of this multipart.

Trait Implementations

impl Debug for Multipart[src]

impl Default for Multipart[src]

impl Eq for Multipart[src]

impl From<Message> for Multipart[src]

impl<T: Into<Message>> From<Vec<T>> for Multipart[src]

impl FromIterator<Message> for Multipart[src]

impl Index<usize> for Multipart[src]

type Output = Message

The returned type after indexing.

impl IndexMut<usize> for Multipart[src]

impl IntoIterator for Multipart[src]

type Item = Message

The type of the elements being iterated over.

type IntoIter = IntoIter<Self::Item>

Which kind of iterator are we turning this into?

impl PartialEq<Multipart> for Multipart[src]

impl StructuralEq for Multipart[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

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

impl<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.