Struct SenderTrustPolicyRevision
- Namespace
- MailFathom.Domain.Emails.Authentication
- Assembly
- MailFathom.Domain.dll
Names the trusted-sender policy one stored verdict was reached under.
public readonly record struct SenderTrustPolicyRevision : IEquatable<SenderTrustPolicyRevision>
- Implements
- Inherited Members
Remarks
A verdict outlives the policy that produced it. An operator adds a domain, a reader trusts a correspondent, an account is removed — and every message already judged keeps the answer it was judged with, because rewriting stored verdicts would change what a reader was shown without anybody having reread the mail. The revision is what makes that legible rather than silent: two verdicts carrying different revisions were reached under different lists, and one carrying None was never put to a policy at all.
It is a digest of the effective policy rather than a counter, so it needs no stored state to allocate it and the same list always names itself the same way — including after a restart, and including on a second deployment configured identically. It is not a secret and protects nothing; what it has to do is differ whenever the list does.
Fields
- Length
The number of characters a revision is written as, which every column holding one is sized for.
Properties
- NamesAPolicy
Gets whether this revision names a policy, which is false exactly for None.
- None
Gets the revision that names no policy, which is what a verdict no policy produced carries.
Methods
- FromStoredValue(string?)
Reads back a revision a column stored.
- Of(IEnumerable<string>)
Derives the revision of a policy from the statements it is made of.
- ToString()
Returns the fully qualified type name of this instance.