pub struct GroupCreateOptions {
pub subject: String,
pub participants: Vec<GroupParticipantOptions>,
pub member_link_mode: Option<MemberLinkMode>,
pub member_add_mode: Option<MemberAddMode>,
pub membership_approval_mode: Option<MembershipApprovalMode>,
pub ephemeral_expiration: Option<u32>,
pub is_parent: bool,
pub closed: bool,
pub allow_non_admin_sub_group_creation: bool,
pub create_general_chat: bool,
}Expand description
Options for creating a new group.
Fields§
§subject: String§participants: Vec<GroupParticipantOptions>§member_link_mode: Option<MemberLinkMode>§member_add_mode: Option<MemberAddMode>§membership_approval_mode: Option<MembershipApprovalMode>§ephemeral_expiration: Option<u32>§is_parent: boolCreate as a community (parent group). Emits <parent/> in the create stanza.
closed: boolWhether the community is closed (requires approval to join).
Only used when is_parent is true.
allow_non_admin_sub_group_creation: boolAllow non-admin members to create subgroups.
Only used when is_parent is true.
create_general_chat: boolCreate a general chat subgroup alongside the community.
Only used when is_parent is true.
Implementations§
Source§impl GroupCreateOptions
impl GroupCreateOptions
Sourcepub fn builder() -> GroupCreateOptionsBuilder
pub fn builder() -> GroupCreateOptionsBuilder
Create a builder for building GroupCreateOptions.
On the builder, call .subject(...), .participants(...)(optional), .member_link_mode(...)(optional), .member_add_mode(...)(optional), .membership_approval_mode(...)(optional), .ephemeral_expiration(...)(optional), .is_parent(...)(optional), .closed(...)(optional), .allow_non_admin_sub_group_creation(...)(optional), .create_general_chat(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of GroupCreateOptions.
Source§impl GroupCreateOptions
impl GroupCreateOptions
Sourcepub fn new(subject: impl Into<String>) -> GroupCreateOptions
pub fn new(subject: impl Into<String>) -> GroupCreateOptions
Create new options with just a subject (for backwards compatibility).
pub fn with_participant( self, participant: GroupParticipantOptions, ) -> GroupCreateOptions
pub fn with_participants( self, participants: Vec<GroupParticipantOptions>, ) -> GroupCreateOptions
pub fn with_member_link_mode(self, mode: MemberLinkMode) -> GroupCreateOptions
pub fn with_member_add_mode(self, mode: MemberAddMode) -> GroupCreateOptions
pub fn with_membership_approval_mode( self, mode: MembershipApprovalMode, ) -> GroupCreateOptions
pub fn with_ephemeral_expiration(self, expiration: u32) -> GroupCreateOptions
Trait Implementations§
Source§impl Clone for GroupCreateOptions
impl Clone for GroupCreateOptions
Source§fn clone(&self) -> GroupCreateOptions
fn clone(&self) -> GroupCreateOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for GroupCreateOptions
impl Debug for GroupCreateOptions
Source§impl Default for GroupCreateOptions
impl Default for GroupCreateOptions
Source§fn default() -> GroupCreateOptions
fn default() -> GroupCreateOptions
Auto Trait Implementations§
impl Freeze for GroupCreateOptions
impl RefUnwindSafe for GroupCreateOptions
impl Send for GroupCreateOptions
impl Sync for GroupCreateOptions
impl Unpin for GroupCreateOptions
impl UnsafeUnpin for GroupCreateOptions
impl UnwindSafe for GroupCreateOptions
Blanket Implementations§
Source§impl<T> AggregateExpressionMethods for T
impl<T> AggregateExpressionMethods for T
Source§fn aggregate_distinct(self) -> Self::Outputwhere
Self: DistinctDsl,
fn aggregate_distinct(self) -> Self::Outputwhere
Self: DistinctDsl,
DISTINCT modifier for aggregate functions Read moreSource§fn aggregate_all(self) -> Self::Outputwhere
Self: AllDsl,
fn aggregate_all(self) -> Self::Outputwhere
Self: AllDsl,
ALL modifier for aggregate functions Read moreSource§fn aggregate_filter<P>(self, f: P) -> Self::Output
fn aggregate_filter<P>(self, f: P) -> Self::Output
Source§fn aggregate_order<O>(self, o: O) -> Self::Outputwhere
Self: OrderAggregateDsl<O>,
fn aggregate_order<O>(self, o: O) -> Self::Outputwhere
Self: OrderAggregateDsl<O>,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> IntoSql for T
impl<T> IntoSql for T
Source§fn into_sql<T>(self) -> Self::Expression
fn into_sql<T>(self) -> Self::Expression
self to an expression for Diesel’s query builder. Read moreSource§fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
&self to an expression for Diesel’s query builder. Read more