pub enum Restriction {
PauseJoins,
DisableInviteRedeem,
DisableInviteCreate,
RequireApproval,
RestrictNewcomers,
DisableAttachments,
DisableLinks,
DisableMassMentions,
RestrictVoice,
RestrictExpensive,
}Expand description
One lockdown restriction (§8.10).
Variants§
PauseJoins
No new memberships.
DisableInviteRedeem
invite.redeem refused.
DisableInviteCreate
invite.create refused.
RequireApproval
Every join starts pending.
RestrictNewcomers
The newcomer mask applies to members admitted within newcomer_window_s.
DisableAttachments
No attachments.
DisableLinks
No links in content.
DisableMassMentions
No mass mentions.
RestrictVoice
No voice.
RestrictExpensive
Expensive operations blocked.
Trait Implementations§
Source§impl Clone for Restriction
impl Clone for Restriction
Source§fn clone(&self) -> Restriction
fn clone(&self) -> Restriction
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for Restriction
Source§impl Debug for Restriction
impl Debug for Restriction
Source§impl<'de> Deserialize<'de> for Restriction
impl<'de> Deserialize<'de> for Restriction
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Restriction
Source§impl Hash for Restriction
impl Hash for Restriction
Source§impl Ord for Restriction
impl Ord for Restriction
Source§fn cmp(&self, other: &Restriction) -> Ordering
fn cmp(&self, other: &Restriction) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for Restriction
impl PartialEq for Restriction
Source§impl PartialOrd for Restriction
impl PartialOrd for Restriction
Source§impl Serialize for Restriction
impl Serialize for Restriction
impl StructuralPartialEq for Restriction
Auto Trait Implementations§
impl Freeze for Restriction
impl RefUnwindSafe for Restriction
impl Send for Restriction
impl Sync for Restriction
impl Unpin for Restriction
impl UnsafeUnpin for Restriction
impl UnwindSafe for Restriction
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
Mutably borrows from an owned value. Read more