pub struct Multipart(pub VecDeque<Message>);
Expand description
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.
Tuple Fields§
§0: VecDeque<Message>
Implementations§
source§impl Multipart
impl Multipart
sourcepub fn push_front(&mut self, item: Message)
pub fn push_front(&mut self, item: Message)
Adds a message to the front of the multipart.
sourcepub fn pop_front(&mut self) -> Option<Message>
pub fn pop_front(&mut self) -> Option<Message>
Removes the first message from the multipart and returns it, or None
if it is empty.
sourcepub fn pop_back(&mut self) -> Option<Message>
pub fn pop_back(&mut self) -> Option<Message>
Removes the last message from the multipart and returns it, or None
if it is empty.
Trait Implementations§
source§impl FromIterator<Message> for Multipart
impl FromIterator<Message> for Multipart
source§impl IntoIterator for Multipart
impl IntoIterator for Multipart
source§impl PartialEq<Multipart> for Multipart
impl PartialEq<Multipart> for Multipart
impl Eq for Multipart
impl StructuralEq for Multipart
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§
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