pub fn parse_envelope_document(
body: &Value,
) -> Option<(String, TrustTask<Value>)>Expand description
Parse a DIDComm envelope body into (threadId, document). None when the
body is not a threaded Trust Task document.
The returned threadId is a dispatch key, not a check: it tells a
caller holding a map of outstanding requests which one this document
belongs to. It does not establish that the document is a reply to anything
the caller sent. Correlate before acting — either by finding the thread in
your own outstanding map, or with parse_envelope_document_for.