Struct StoredContentClaimAttempt
- Namespace
- MailFathom.Application.EmailContent.Storage
- Assembly
- MailFathom.Application.dll
What asking the ceilings for room produced: the claim, or the bound that refused it.
public readonly record struct StoredContentClaimAttempt : IEquatable<StoredContentClaimAttempt>
- Implements
- Inherited Members
Remarks
The refusal names its bound rather than being an absent claim, because what a caller records about a deferred message and what an operator has to act on both depend on which of the two ceilings was met. A granted attempt names no bound, so the two states cannot both be read as true.
Both factories refuse the arguments that would produce a nonsense attempt, and being a struct leaves one shape they cannot reach: default, which holds no claim and names no bound. Nothing here produces it — this type is returned by TryClaimAsync(MailAccountId, long, CancellationToken) and read at the call site — and a reader who does reach one is holding an attempt that was never made rather than a granted or a refused one. It is documented rather than designed away, exactly as UserId documents its own, because the alternative is an allocation per stored message to describe a state no code path constructs.
Properties
- ReachedBound
Gets which ceiling refused, or None where the claim was granted.
Methods
- Granted(StoredContentClaim)
Reports room held for one payload.
- Refused(StoredContentBound)
Reports that one of the ceilings had no room.