Table of Contents

Class ImageAttachmentDescription

Namespace
MailFathom.Application.Emails.Extraction.Images
Assembly
MailFathom.Application.dll

What reading one image attachment produced: a transcription of its words, a description of what it shows, or the reason there are neither.

public sealed record ImageAttachmentDescription : IEquatable<ImageAttachmentDescription>
Inheritance
ImageAttachmentDescription
Implements
Inherited Members

Remarks

Exactly one of the two is present, and the two factories below are the only way to make one — which is why the constructor is private rather than the positional one a record would otherwise publish alongside a with expression. Both would let a caller compose a value carrying neither, and a caller branching on the contract stated here would then store nothing while recording no reason. A refusal is a result rather than an exception because every one of them is an ordinary property of the mail a mailbox holds — a signature image in a format nothing reads, a photograph larger than one request sends, a provider having a bad afternoon — and none of them is a fault in this deployment worth unwinding a background run for.

The text is a machine's account of octets a stranger composed, so it is untrusted twice over: whoever stores, indexes, presents, or hands it to a model treats it exactly as they treat text extracted from an attachment, and never as something the sender wrote.

Properties

IsTranscription

Gets whether Text is the words the picture carries rather than an account of what it shows.

ReachedProvider

Gets whether a request actually left this deployment for the provider.

Refusal

Gets why nothing was described, or null where something was.

Text

Gets what the picture shows, or null where nothing was described.

Methods

Described(string)

Carries what the model said the picture shows.

Refused(ImageDescriptionRefusal)

Records why the attachment produced no description.

Transcribed(string)

Carries the words the model read off a picture of a document.