pub enum Command {
Subscribe {
underlying: String,
expiration: ExpirationDate,
},
Unsubscribe {
underlying: String,
expiration: ExpirationDate,
},
Reconnect,
Rediscover,
ReloadBundle(PathBuf),
}Expand description
A render-loop -> data-layer command (§4).
Emitted by a fold that needs I/O so the handler itself stays pure and fast:
the async data layer performs the actual subscribe / reconnect / bundle work.
It rides the app’s bounded, small command channel; a send is non-blocking
and never awaited (docs/02-tui-architecture.md §4, §5).
PartialEq/Eq are intentionally not derived: ExpirationDate does
not implement them, and modelling the subscribe payloads exactly as
docs/02-tui-architecture.md §4 specifies (an ExpirationDate, not a
pre-resolved instant) is worth more than value-comparability — tests
pattern-match on the received command instead.
Variants§
Subscribe
Live: open the streams for one (underlying, expiration).
Fields
expiration: ExpirationDateThe expiration to subscribe.
Unsubscribe
Live: drop the subscription for one (underlying, expiration).
Fields
expiration: ExpirationDateThe expiration to unsubscribe.
Reconnect
Live: provider-driven recovery — reconnect the active stream (r).
Rediscover
Live: mode reload — re-run discover + fetch for the active provider (R).
ReloadBundle(PathBuf)
Replay: re-open and revalidate the bundle at the directory (R). Seeking
is not a command: with the whole bundle loaded (#33) a scrub is an
in-memory cursor move folded directly by AppEvent::ReplaySeek, never a
round-trip to the data layer.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Command
impl RefUnwindSafe for Command
impl Send for Command
impl Sync for Command
impl Unpin for Command
impl UnsafeUnpin for Command
impl UnwindSafe for Command
Blanket Implementations§
impl<T> Allocation 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,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> 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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.