MCPcopy Create free account
hub / github.com/chatmail/core / parse_msg

Method parse_msg

src/test_utils.rs:795–799  ·  view source on GitHub ↗

Parses a message. Parsing a message does not run the entire receive pipeline, but is not without side-effects either. E.g. if the message includes autocrypt headers, gossiped public keys will be saved. Later receiving the message using [Self.recv_msg()] is unlikely to be affected as the message would be processed again in exactly the same way.

(&self, msg: &SentMessage<'_>)

Source from the content-addressed store, hash-verified

793 /// unlikely to be affected as the message would be processed again in exactly the
794 /// same way.
795 pub(crate) async fn parse_msg(&self, msg: &SentMessage<'_>) -> MimeMessage {
796 MimeMessage::from_bytes(&self.ctx, msg.payload().as_bytes())
797 .await
798 .unwrap()
799 }
800
801 /// Receive a message using the `receive_imf()` pipeline. Panics if it's not shown
802 /// in the chat as exactly one message.

Calls 1

payloadMethod · 0.80

Tested by

no test coverage detected