[−][src]Struct tmq::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]
fn from_iter<T: IntoIterator<Item = Message>>(iter: T) -> Self
[src]
impl Index<usize> for Multipart
[src]
type Output = Message
The returned type after indexing.
fn index(&self, index: usize) -> &Self::Output
[src]
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?
fn into_iter(self) -> Self::IntoIter
[src]
impl PartialEq<Multipart> for Multipart
[src]
impl StructuralEq for Multipart
[src]
Auto Trait Implementations
impl RefUnwindSafe for Multipart
impl Send for Multipart
impl Sync for Multipart
impl Unpin for Multipart
impl UnwindSafe for Multipart
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<I> IntoIterator for I where
I: Iterator,
[src]
I: Iterator,
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?
fn into_iter(self) -> I
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,