pub struct CrashEnvelope {
pub metadata: CrashMetadata,
pub dump: Vec<u8>,
pub attachments: Vec<CrashAttachment>,
}Expand description
In-memory description of the crash multipart layout.
Wire parts:
metadata:Content-Type: application/json, payload isCrashMetadata.dump:Content-Type: application/octet-stream, payload is the crash dump.attach:<key>: optional files declared inCrashMetadata::attachments.
Fields§
§metadata: CrashMetadataJSON metadata part.
dump: Vec<u8>Raw dump bytes.
attachments: Vec<CrashAttachment>Additional attachment payloads.
Implementations§
Source§impl CrashEnvelope
impl CrashEnvelope
Sourcepub async fn write_to<W>(&self, writer: &mut W) -> Result<(), ProtocolError>where
W: AsyncWrite + Unpin,
pub async fn write_to<W>(&self, writer: &mut W) -> Result<(), ProtocolError>where
W: AsyncWrite + Unpin,
Writes the envelope as an RFC 7578 multipart body with DEFAULT_BOUNDARY.
Sourcepub async fn write_to_with_boundary<W>(
&self,
writer: &mut W,
boundary: &str,
) -> Result<(), ProtocolError>where
W: AsyncWrite + Unpin,
pub async fn write_to_with_boundary<W>(
&self,
writer: &mut W,
boundary: &str,
) -> Result<(), ProtocolError>where
W: AsyncWrite + Unpin,
Writes the envelope as an RFC 7578 multipart body.
Sourcepub async fn write_to_with_boundary_and_encodings<W>(
&self,
writer: &mut W,
boundary: &str,
encodings: &EnvelopeEncodings,
) -> Result<(), ProtocolError>where
W: AsyncWrite + Unpin,
pub async fn write_to_with_boundary_and_encodings<W>(
&self,
writer: &mut W,
boundary: &str,
encodings: &EnvelopeEncodings,
) -> Result<(), ProtocolError>where
W: AsyncWrite + Unpin,
Writes the envelope as an RFC 7578 multipart body, applying per-part
Content-Encoding headers as specified by encodings.
Sourcepub async fn read_from<R>(reader: &mut R) -> Result<Self, ProtocolError>
pub async fn read_from<R>(reader: &mut R) -> Result<Self, ProtocolError>
Parses an envelope from a body using DEFAULT_BOUNDARY.
Sourcepub async fn read_from_with_boundary<R>(
reader: &mut R,
boundary: &str,
) -> Result<Self, ProtocolError>
pub async fn read_from_with_boundary<R>( reader: &mut R, boundary: &str, ) -> Result<Self, ProtocolError>
Parses an envelope from a body with the supplied multipart boundary.
Trait Implementations§
Source§impl Clone for CrashEnvelope
impl Clone for CrashEnvelope
Source§fn clone(&self) -> CrashEnvelope
fn clone(&self) -> CrashEnvelope
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CrashEnvelope
impl Debug for CrashEnvelope
Source§impl<'de> Deserialize<'de> for CrashEnvelope
impl<'de> Deserialize<'de> for CrashEnvelope
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for CrashEnvelope
impl PartialEq for CrashEnvelope
Source§fn eq(&self, other: &CrashEnvelope) -> bool
fn eq(&self, other: &CrashEnvelope) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for CrashEnvelope
impl Serialize for CrashEnvelope
impl Eq for CrashEnvelope
impl StructuralPartialEq for CrashEnvelope
Auto Trait Implementations§
impl Freeze for CrashEnvelope
impl RefUnwindSafe for CrashEnvelope
impl Send for CrashEnvelope
impl Sync for CrashEnvelope
impl Unpin for CrashEnvelope
impl UnsafeUnpin for CrashEnvelope
impl UnwindSafe for CrashEnvelope
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request