pub enum Subject {
Home,
Board,
Session(SessionSlot),
Usage,
DictateModels,
Extensions,
}Expand description
What a client can watch. A subscription names one of these and is answered with that subject’s snapshot.
Variants§
Home
Board
Every project’s board detail: its rows, its schedules and its connector subscriptions.
A subject of its own rather than fields of Subject::Home because
the board is its own page’s data: the home is a glance at the fleet,
and carrying every project’s rows made a home read about 708 KB, most
of it board data a home page draws none of (#2517).
Session(SessionSlot)
Usage
The token/cost pool, scanned on the ask.
It belongs to no seat - the report is the whole session-JSONL pool, bucketed by project and model - and no update carries it: the pool changes as transcripts are written, and nothing in the stream says a transcript’s tokens moved. So a subscription is answered with one scan and hears nothing after it, and a client asks again by subscribing again.
DictateModels
The models page’s read: the pinned models, the catalogue check, the feed’s rows and the updates it proposes.
Carried as a subject of its own rather than inside Home because
the rows are the whole catalogue and only the models page draws
them. Unlike Usage it does hear updates: a check landing, boot’s
or a page’s own, arrives as SessionUpdate::DictateModelsChanged.
Extensions
The Extensions page’s read: the plugin inventory, the marketplace health and the last update run.
A subject of its own for DictateModels’ reason - only the
Extensions page draws any of it - and it hears the whole Plugins*
family: an action’s outcome, a run’s progress, and the refreshed
inventory are all news about what this subscription is showing.
Implementations§
Source§impl Subject
impl Subject
Sourcepub fn covers(&self, update: &SessionUpdate) -> bool
pub fn covers(&self, update: &SessionUpdate) -> bool
Whether an update belongs to what this subscription asked for.
A session subscription is a seat, so the workspace is ASKED which seat a variant routes to rather than this matching the variants itself.
A home subscription is a row per seat plus the App-level facts, and it
takes the classification that already exists for the row half:
fleet_news, which is what the view folding this stream draws the
fleet from. It is narrow on purpose - a row states a seat’s lifecycle,
its status and its pending state, and no row shows a word of its
conversation - so a second table of variants here would both drift and
hand a home subscriber every token of every seat in the fleet.
The fleet region is not the whole home. Two home fields carry no slot and are not fleet news: the service status and the fatal error. They come with the slot-less arm below, and without it a client would draw what it read once at subscribe for the life of the connection. The account pool is a home field too, but its announcement is also a fleet redraw, so it arrives through the first arm.
That arm is wider than the client’s read rule, by the plugin
family. The plugin records cross to a home subscriber only because
they name no seat; no field of the home snapshot carries them, their
reader is the extensions subject, and coversHome
(client/src/wire/fleet.ts) declines the home read for them on
purpose. Delivery here is the superset.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Subject
impl<'de> Deserialize<'de> for Subject
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for Subject
impl StructuralPartialEq for Subject
Auto Trait Implementations§
impl Freeze for Subject
impl RefUnwindSafe for Subject
impl Send for Subject
impl Sync for Subject
impl Unpin for Subject
impl UnsafeUnpin for Subject
impl UnwindSafe for Subject
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more