Module chat

Module chat 

Source
Expand description

Allocated chat facade around the text engine (feature alloc).

ChatFacade owns an Engine and the state every platform keeps beside it: the channels a session can hold conversations in, the full keys learned for channel members known only by hint, and the bookkeeping that lets a rejected compose put the engine back the way storage last saw it. Conversations are typed ConversationKeys; platform address formats are codecs over them, outside this module.

Engine outputs leave the facade owned—bodies copied out of the engine’s render arena—and in the order the engine produced them. Frames for the radio leave only inside an Outbound, which only the facade makes:

  • ChatFacade::compose returns a PendingBatch that holds its frames until ChatFacade::commit releases them, after the platform has stored the batch’s checkpoint, archive changes, and transcript mutations. A failed store calls ChatFacade::reject instead, which fails the frames and rebuilds the engine from the checkpoints storage still holds.
  • ChatFacade::drain returns everything else the engine produced, with the frames that answer resend requests and ask for repairs. None of them allocates a wire ID, so none waits on storage.

Structs§

ArchiveDelete
Retire every archived fragment stored under one message ID.
ArchiveLookup
Look up resendable material; answer with ChatFacade::archive_result.
ArchiveWrite
Store this exact payload as resendable material under key.
BatchMismatch
The batch is not the one this facade is waiting on.
ChannelRegistry
The channels a session can hold a conversation in, and the keys to reach them.
ChatFacade
The chat facade.
Delivery
A change in a frame’s delivery.
Drain
What the facade produced since the last drain.
Insert
A new transcript record (see MutationKind::Insert).
Mutation
An owned transcript mutation (see MessageMutation).
Outbound
Frames released to the radio, from one engine session.
PendingBatch
A composed message waiting to be stored.
Seeds
Values a facade session is started from.
SenderResolution
A channel member previously known only by their claimed hint has been resolved to a full public key.

Enums§

Change
ChatComposeError
ChatOutput
One owned facade output.
ChatReceiveError
TextSource
Who a received text payload came from, and over what.
TransmitUpdate
Transport progress for a released frame.