Class StoredEmailContent
- Namespace
- MailFathom.Application.EmailContent.Storage
- Assembly
- MailFathom.Application.dll
Carries the raw MIME stored for one email together with what was recorded about it when it was written.
public sealed record StoredEmailContent : IEquatable<StoredEmailContent>
- Inheritance
-
StoredEmailContent
- Implements
- Inherited Members
Remarks
The two recorded values travel with the payload rather than staying inside the store, because the caller that reads content is the one that has to decide what a mismatch means. A store that checked them itself could only throw, and a damaged local copy is something a read answers with a stable failure and a repair request, not with an exception nobody above it can interpret.
The payload is mail content and personal data by default. Nothing here may be logged, and neither may its length or digest be used as a substitute for identifying a message in a log line.
Constructors
- StoredEmailContent(ReadOnlyMemory<byte>, long, ReadOnlyMemory<byte>)
Carries the raw MIME stored for one email together with what was recorded about it when it was written.
Properties
- RawMime
The stored RFC 822 bytes.
- RecordedByteLength
How many bytes the writer said it stored.
- RecordedSha256Hash
The SHA-256 digest the writer computed over those bytes.
Methods
- FindIntegrityDefect()
Finds the defect that makes the stored payload differ from what was recorded for it.