Skip to main content

encode_subject

Function encode_subject 

Source
pub async fn encode_subject(
    state: &TransportState,
    subject: &Subject,
) -> Result<Value>
Expand description

A subject’s wire form. The ONE place it is produced.

Async because a session’s git section is a filesystem read, so the working tree’s state is awaited rather than guessed at.

A seat naming no project forge has loaded is an error rather than an empty snapshot, because a client drawing an empty page would read that as a broken one rather than as a seat that does not exist.

A project that has simply not started is not that case: its directory resolves from the declaration, so it is answered - with the session’s own fields empty and a working tree read per read, since no held seat has a store to keep one in.