pub enum TopicsPolicy {
Inherit,
AllowEmptyTopic,
DisableEmptyTopic,
EmptyTopicOnly,
}Expand description
Represents whether named topics and the empty topic are enabled in a channel.
\"inherit\": Messages can be sent to named topics in this channel, and the organization-levelrealm_topics_policyis used for whether messages can be sent to the empty topic in this channel.\"allow_empty_topic\": Messages can be sent to both named topics and the empty topic in this channel.\"disable_empty_topic\": Messages can be sent to named topics in this channel, but the empty topic is disabled.\"empty_topic_only\": Messages can be sent to the empty topic in this channel, but named topics are disabled.
The \"empty_topic_only\" policy can only be set if all existing messages in the channel are already in the empty topic. When creating a new channel, if the topics_policy is not specified, the \"inherit\" option will be set.
Changes: In Zulip 11.0 (feature level 404), the \"empty_topic_only\" option was added. New in Zulip 11.0 (feature level 392). [realm-topics-policy]: /help/require-topics#set-the-default-general-chat-topic-configuration
Modified from openapi-generator-cli output:
$ openapi-generator-cli generate -g rust -i ./zerver/openapi/zulip.yaml -o zulip-openapi --skip-validate-spec/*
* Zulip REST API
*
* Powerful open source group chat
*
* The version of the OpenAPI document: 1.0.0
*
* Generated by: https://openapi-generator.tech
*/See zerver/openapi/zulip.yaml for the original OpenAPI configuration.
Configuration slightly modified to work with the Rust generator of openapi-generator-cli.
Variants§
Implementations§
Source§impl TopicsPolicy
impl TopicsPolicy
Sourcepub const fn new() -> Self
pub const fn new() -> Self
Creates a new TopicsPolicy.
Sourcepub const fn as_str(&self) -> &'static str
pub const fn as_str(&self) -> &'static str
Gets the TopicsPolicy string representation.
Trait Implementations§
Source§impl Clone for TopicsPolicy
impl Clone for TopicsPolicy
impl Copy for TopicsPolicy
Source§impl Debug for TopicsPolicy
impl Debug for TopicsPolicy
Source§impl Default for TopicsPolicy
impl Default for TopicsPolicy
Source§impl<'de> Deserialize<'de> for TopicsPolicy
impl<'de> Deserialize<'de> for TopicsPolicy
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>,
Source§impl Display for TopicsPolicy
impl Display for TopicsPolicy
impl Eq for TopicsPolicy
Source§impl Hash for TopicsPolicy
impl Hash for TopicsPolicy
Source§impl Ord for TopicsPolicy
impl Ord for TopicsPolicy
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 PartialEq for TopicsPolicy
impl PartialEq for TopicsPolicy
Source§impl PartialOrd for TopicsPolicy
impl PartialOrd for TopicsPolicy
Source§impl Serialize for TopicsPolicy
impl Serialize for TopicsPolicy
impl StructuralPartialEq for TopicsPolicy
Auto Trait Implementations§
impl Freeze for TopicsPolicy
impl RefUnwindSafe for TopicsPolicy
impl Send for TopicsPolicy
impl Sync for TopicsPolicy
impl Unpin for TopicsPolicy
impl UnsafeUnpin for TopicsPolicy
impl UnwindSafe for TopicsPolicy
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,
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>,
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.