pub enum ChannelId {
IMessage,
Slack,
}Expand description
The closed set of approval channels. Exhaustively matched everywhere —
no _ => wildcard (CLAUDE.md rule #2), so a future channel forces every
match site to be revisited rather than silently swallowed.
Serialized as a stable lowercase string ("imessage" / "slack") so it is
a deterministic BTreeMap key on disk (Unit 2) and a back-compat wire token
(Unit 6 adds the optional channel request field, defaulting to
IMessage). Ord is derived for the BTreeMap key ordering, giving
messaging.json a deterministic channel order regardless of insert order.
Variants§
IMessage
Apple iMessage — the FIRST adapter (#403’s transport, re-homed). The back-compat default for the WS surface.
Slack
Slack — Socket Mode inbound + Web API + Block Kit buttons (Unit 4). The maximally-different second channel that proves the seam holds.
Implementations§
Source§impl ChannelId
impl ChannelId
Sourcepub const ALL: [ChannelId; 2]
pub const ALL: [ChannelId; 2]
Every channel, in Ord order. The cross-platform boot/registry iterates
this to spawn each enabled adapter (Unit 3). Exhaustive by construction —
adding a variant means adding it here.
Sourcepub fn as_str(self) -> &'static str
pub fn as_str(self) -> &'static str
The stable string key (matches the serde rename). Exhaustive match — no wildcard.
Sourcepub fn from_str_opt(s: &str) -> Option<ChannelId>
pub fn from_str_opt(s: &str) -> Option<ChannelId>
Parse the stable string key back to a ChannelId. The WS surface uses
this to map the optional channel request field (Unit 6); an absent
field defaults to IMessage at the call site, not here.
Trait Implementations§
impl Copy for ChannelId
Source§impl<'de> Deserialize<'de> for ChannelId
impl<'de> Deserialize<'de> for ChannelId
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ChannelId, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ChannelId, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for ChannelId
Source§impl Ord for ChannelId
impl Ord for ChannelId
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialOrd for ChannelId
impl PartialOrd for ChannelId
Source§impl Serialize for ChannelId
impl Serialize for ChannelId
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for ChannelId
Auto Trait Implementations§
impl Freeze for ChannelId
impl RefUnwindSafe for ChannelId
impl Send for ChannelId
impl Sync for ChannelId
impl Unpin for ChannelId
impl UnsafeUnpin for ChannelId
impl UnwindSafe for ChannelId
Blanket Implementations§
impl<T> Boilerplate 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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
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 more