Skip to main content

AllowlistView

Struct AllowlistView 

Source
pub struct AllowlistView {
    pub access_groups: Option<HashMap<String, HashMap<String, Vec<String>>>>,
    pub dm: Option<Vec<String>>,
    pub dm_policy: Option<String>,
    pub group: Option<Vec<String>>,
    pub group_policy: Option<String>,
    pub paired: Option<Vec<String>>,
}

Fields§

§access_groups: Option<HashMap<String, HashMap<String, Vec<String>>>>

AccessGroups is the org’s named sender sets, as group name -> channel -> member entries, held once for the whole org. A DM or Group entry written accessGroup:<name> admits any sender listed under that name for THIS channel, or under the channel *, which is how one set covers every transport at once. Replaced wholesale by the PUT.

§dm: Option<Vec<String>>

DM is the CONFIG-managed DM allow entries — the list PUT /v1/channels/allowlist owns and replaces wholesale. An entry matches a sender either EXACTLY, as the transport-native id inbox messages carry, or as accessGroup:<name> resolved through AccessGroups. A bare * admits everyone, but only while DMPolicy is "open": it is gate syntax, not an identity, so under "allowlist" it matches nobody.

§dm_policy: Option<String>

DMPolicy decides every inbound DIRECT message, defaulting to "pairing" when the org has never set one. "pairing": a sender with no entry is sent a pairing code and the message is DROPPED — it never reaches the inbox — and they are admitted only once an admin approves. "allowlist": only DM admits, and Paired senders are suspended, since a pairing grant counts under "pairing" alone. "open" is not unconditional either — it still requires * or a matching entry in DM.

§group: Option<Vec<String>>

Group is the CONFIG-managed group allow entries, consulted only while GroupPolicy is "allowlist". Entries match the same two ways as DM, and here a bare * admits every sender in the room.

§group_policy: Option<String>

GroupPolicy decides every inbound GROUP or THREAD message — a thread is a group surface — defaulting to "open". "open" admits every sender in the room. "allowlist" admits only what Group lists, so an EMPTY Group blocks the channel’s group rooms outright. "disabled" drops all of them.

§paired: Option<Vec<String>>

Paired is the senders admitted by PAIRING — the entries POST /v1/channels/pairing/approve minted, DM scope only. READ-ONLY on this endpoint: the PUT writes config entries and can never revoke one of these (listing a paired sender under DM instead promotes that entry to config, which the admin then owns). They admit only while DMPolicy is "pairing".

Implementations§

Trait Implementations§

Source§

impl Clone for AllowlistView

Source§

fn clone(&self) -> AllowlistView

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for AllowlistView

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for AllowlistView

Source§

fn default() -> AllowlistView

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for AllowlistView

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for AllowlistView

Source§

fn eq(&self, other: &AllowlistView) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for AllowlistView

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for AllowlistView

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more