pub struct ChannelConfig {
pub enabled: bool,
pub allowlisted_handles: Vec<String>,
pub active_pairing_code: Option<String>,
pub slack_token_ref: Option<SlackTokenRef>,
pub slack_channel_id: Option<String>,
}Expand description
Per-channel trust state. The first three fields are exactly #403’s iMessage
config (enabled, allowlisted_handles, active_pairing_code) — now held
once per channel under
crate::messaging_config::MessagingConfig::channels. The Slack-only
slack_token_ref holds the keychain REFERENCE for that channel’s provisioned
tokens (MC-9 — a ref, never a bearer), None for iMessage / an
un-provisioned Slack channel.
Default is fail-closed: enabled = false (MC-5 — both channels start
disabled), empty allowlist, no pairing code, no token ref.
Fields§
§enabled: boolMaster opt-in flag for THIS channel. Default false — the channel is
silent until the host UI flips it on.
allowlisted_handles: Vec<String>Handles permitted to resolve approvals over THIS channel. A handle lands
here ONLY via a host-gated messaging.config.set add or a code-proven
pairing — never from an inbound message.
active_pairing_code: Option<String>The currently-active pairing code for THIS channel, if a pairing is in
flight. None when no pairing is pending; cleared on a successful bind.
slack_token_ref: Option<SlackTokenRef>Keychain reference for THIS channel’s provisioned tokens (Slack only,
MC-9). Some once messaging.config.set has provisioned bot_token +
app_token into the keychain; the value is a reference (key names),
never a bearer. None for iMessage and for an un-provisioned Slack
channel. Doubles as the “provisioned” marker.
slack_channel_id: Option<String>The Slack conversation/channel id (C0123… / D024…) the outbound
approval prompt posts into (Slack only). This is configuration, not a
secret — unlike the tokens it is persisted IN messaging.json (NOT the
keychain), set on the same host-gated messaging.config.set call as the
tokens. None for iMessage and for a Slack channel that has not had its
post-channel set yet (the adapter is then built but cannot post — a
safe no-op outbound).
Trait Implementations§
Source§impl Clone for ChannelConfig
impl Clone for ChannelConfig
Source§fn clone(&self) -> ChannelConfig
fn clone(&self) -> ChannelConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ChannelConfig
impl Debug for ChannelConfig
Source§impl Default for ChannelConfig
impl Default for ChannelConfig
Source§fn default() -> ChannelConfig
fn default() -> ChannelConfig
Source§impl<'de> Deserialize<'de> for ChannelConfig
impl<'de> Deserialize<'de> for ChannelConfig
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ChannelConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ChannelConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for ChannelConfig
Source§impl PartialEq for ChannelConfig
impl PartialEq for ChannelConfig
Source§impl Serialize for ChannelConfig
impl Serialize for ChannelConfig
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 ChannelConfig
Auto Trait Implementations§
impl Freeze for ChannelConfig
impl RefUnwindSafe for ChannelConfig
impl Send for ChannelConfig
impl Sync for ChannelConfig
impl Unpin for ChannelConfig
impl UnsafeUnpin for ChannelConfig
impl UnwindSafe for ChannelConfig
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<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