pub enum EpisodeSource {
Hooks,
Connection,
None,
}Expand description
How an episode boundary can be drawn for one provider.
Three words, because three things are true of different providers and collapsing them into “supported / not supported” is what let this tool report one provider and stay silent about five others. A provider that fires its own events is not the same as one that fires none but speaks MCP, and neither is the same as one that can do nothing.
The words are the declaration’s own, and a word outside them is refused rather than read
as none:
use majordomus_cli::share::EpisodeSource;
let read: EpisodeSource = serde_json::from_str("\"connection\"").unwrap();
assert_eq!(read, EpisodeSource::Connection);
assert_eq!(EpisodeSource::default(), EpisodeSource::None, "undeclared reads as none");
assert!(serde_json::from_str::<EpisodeSource>("\"hook\"").is_err(), "hooks, plural");Variants§
Hooks
The provider fires its own session events and a hook this tool installs draws the boundary from them. The strongest form: it sees a window somebody closed.
Connection
The provider fires no session event, but its client attaches to this repository’s shared MCP server, and the connection is the boundary (ADR 0103).
None
Neither. Nothing can say when this provider’s episode began or ended, and the tool reports that rather than implying a capability nobody has.
Implementations§
Source§impl EpisodeSource
impl EpisodeSource
Sourcepub fn as_str(self) -> &'static str
pub fn as_str(self) -> &'static str
The word as the declaration writes it, which is also how it serialises; capture status prints it beside the evidence that backs it.
use majordomus_cli::share::EpisodeSource;
for s in [EpisodeSource::Hooks, EpisodeSource::Connection, EpisodeSource::None] {
assert_eq!(serde_json::to_string(&s).unwrap(), format!("\"{}\"", s.as_str()));
}Trait Implementations§
Source§impl Clone for EpisodeSource
impl Clone for EpisodeSource
Source§fn clone(&self) -> EpisodeSource
fn clone(&self) -> EpisodeSource
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for EpisodeSource
Source§impl Debug for EpisodeSource
impl Debug for EpisodeSource
Source§impl Default for EpisodeSource
impl Default for EpisodeSource
Source§fn default() -> EpisodeSource
fn default() -> EpisodeSource
Source§impl<'de> Deserialize<'de> for EpisodeSource
impl<'de> Deserialize<'de> for EpisodeSource
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 EpisodeSource
Source§impl JsonSchema for EpisodeSource
impl JsonSchema for EpisodeSource
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for EpisodeSource
impl PartialEq for EpisodeSource
Source§fn eq(&self, other: &EpisodeSource) -> bool
fn eq(&self, other: &EpisodeSource) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for EpisodeSource
impl Serialize for EpisodeSource
impl StructuralPartialEq for EpisodeSource
Auto Trait Implementations§
impl Freeze for EpisodeSource
impl RefUnwindSafe for EpisodeSource
impl Send for EpisodeSource
impl Sync for EpisodeSource
impl Unpin for EpisodeSource
impl UnsafeUnpin for EpisodeSource
impl UnwindSafe for EpisodeSource
Blanket Implementations§
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<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.