pub struct JoinRule {
pub room: WeakRef<Room>,
own_membership_handler: RefCell<Option<SignalHandlerId>>,
join_rule_drop_guard: OnceCell<EventHandlerDropGuard>,
pub matrix_join_rule: RefCell<Option<JoinRule>>,
pub value: Cell<JoinRuleValue>,
pub can_knock: Cell<bool>,
pub display_name: RefCell<String>,
pub membership_room: BoundObject<PillSource>,
pub we_can_join: Cell<bool>,
pub anyone_can_join: Cell<bool>,
}
Fields§
§room: WeakRef<Room>
The room where these permissions apply.
own_membership_handler: RefCell<Option<SignalHandlerId>>
§join_rule_drop_guard: OnceCell<EventHandlerDropGuard>
§matrix_join_rule: RefCell<Option<JoinRule>>
The current join rule.
value: Cell<JoinRuleValue>
The value of the join rule.
can_knock: Cell<bool>
Whether users can knock.
display_name: RefCell<String>
The string to use to display this join rule.
This string can contain markup.
membership_room: BoundObject<PillSource>
The room we need to be a member of to match this join rule, if any.
This can be a Room
or a RemoteRoom
.
we_can_join: Cell<bool>
Whether our own user can join this room on their own.
anyone_can_join: Cell<bool>
Whether anyone can join this room on their own.
Implementations§
source§impl JoinRule
impl JoinRule
sourcefn register_type()
fn register_type()
Registers the type only once.
source§impl JoinRule
impl JoinRule
sourcepub(super) async fn init_join_rule(&self)
pub(super) async fn init_join_rule(&self)
Initialize the join rule.
sourcefn update_join_rule(&self, join_rule: MatrixJoinRule)
fn update_join_rule(&self, join_rule: MatrixJoinRule)
Update the join rule.
sourcefn update_value(&self)
fn update_value(&self)
Update the value of the join rule.
sourcefn update_can_knock(&self)
fn update_can_knock(&self)
Update whether users can knock.
sourcefn update_membership_room(&self)
fn update_membership_room(&self)
Set the room we need to be a member of to match this join rule.
sourcefn update_display_name(&self)
fn update_display_name(&self)
Update the display name of the join rule.
sourcefn update_we_can_join(&self)
fn update_we_can_join(&self)
Update whether our own user can join this room on their own.
sourcefn we_can_join(&self) -> bool
fn we_can_join(&self) -> bool
Whether our own user can join this room on their own.
sourcefn update_anyone_can_join(&self)
fn update_anyone_can_join(&self)
Update whether our own user can join this room on their own.
Trait Implementations§
source§impl DerivedObjectProperties for JoinRule
impl DerivedObjectProperties for JoinRule
source§fn derived_properties() -> &'static [ParamSpec]
fn derived_properties() -> &'static [ParamSpec]
source§fn derived_property(&self, id: usize, pspec: &ParamSpec) -> Value
fn derived_property(&self, id: usize, pspec: &ParamSpec) -> Value
ObjectImpl
but auto-generated by the Properties
macro
to allow handling more complex use-cases.source§fn derived_set_property(&self, id: usize, value: &Value, pspec: &ParamSpec)
fn derived_set_property(&self, id: usize, value: &Value, pspec: &ParamSpec)
ObjectImpl
but auto-generated by the Properties
macro
to allow handling more complex use-cases.source§impl ObjectImpl for JoinRule
impl ObjectImpl for JoinRule
source§fn properties() -> &'static [ParamSpec]
fn properties() -> &'static [ParamSpec]
source§fn set_property(&self, id: usize, value: &Value, pspec: &ParamSpec)
fn set_property(&self, id: usize, value: &Value, pspec: &ParamSpec)
source§fn constructed(&self)
fn constructed(&self)
source§fn notify(&self, pspec: &ParamSpec)
fn notify(&self, pspec: &ParamSpec)
self.notify("property")
.fn dispatch_properties_changed(&self, pspecs: &[ParamSpec])
source§impl ObjectSubclass for JoinRule
impl ObjectSubclass for JoinRule
§type ParentType = Object
type ParentType = Object
§type Interfaces = ()
type Interfaces = ()
§type Class = ClassStruct<JoinRule>
type Class = ClassStruct<JoinRule>
§type Instance = InstanceStruct<JoinRule>
type Instance = InstanceStruct<JoinRule>
source§const ALLOW_NAME_CONFLICT: bool = false
const ALLOW_NAME_CONFLICT: bool = false
source§fn type_init(_type_: &mut InitializingType<Self>)
fn type_init(_type_: &mut InitializingType<Self>)
source§fn class_init(_klass: &mut Self::Class)
fn class_init(_klass: &mut Self::Class)
source§fn with_class(_klass: &Self::Class) -> Self
fn with_class(_klass: &Self::Class) -> Self
source§fn instance_init(_obj: &InitializingObject<Self>)
fn instance_init(_obj: &InitializingObject<Self>)
Auto Trait Implementations§
impl !Freeze for JoinRule
impl !RefUnwindSafe for JoinRule
impl !Send for JoinRule
impl !Sync for JoinRule
impl Unpin for JoinRule
impl !UnwindSafe for JoinRule
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
source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
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 moresource§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
source§fn null_value() -> T
fn null_value() -> T
source§impl<T> ObjectImplExt for Twhere
T: ObjectImpl,
impl<T> ObjectImplExt for Twhere
T: ObjectImpl,
source§fn parent_constructed(&self)
fn parent_constructed(&self)
glib::Object::constructed()
.source§fn parent_notify(&self, pspec: &ParamSpec)
fn parent_notify(&self, pspec: &ParamSpec)
glib::Object::notify()
.source§fn parent_dispatch_properties_changed(&self, pspecs: &[ParamSpec])
fn parent_dispatch_properties_changed(&self, pspecs: &[ParamSpec])
glib::Object::dispatch_properties_changed()
.source§fn signal_chain_from_overridden(
&self,
token: &SignalClassHandlerToken,
values: &[Value],
) -> Option<Value>
fn signal_chain_from_overridden( &self, token: &SignalClassHandlerToken, values: &[Value], ) -> Option<Value>
source§impl<T> ObjectSubclassExt for Twhere
T: ObjectSubclass,
impl<T> ObjectSubclassExt for Twhere
T: ObjectSubclass,
source§fn instance(&self) -> BorrowedObject<'_, <T as ObjectSubclass>::Type>
fn instance(&self) -> BorrowedObject<'_, <T as ObjectSubclass>::Type>
source§fn from_instance(obj: &<T as ObjectSubclass>::Type) -> &T
fn from_instance(obj: &<T as ObjectSubclass>::Type) -> &T
source§fn obj(&self) -> BorrowedObject<'_, <T as ObjectSubclass>::Type>
fn obj(&self) -> BorrowedObject<'_, <T as ObjectSubclass>::Type>
source§fn from_obj(obj: &<T as ObjectSubclass>::Type) -> &T
fn from_obj(obj: &<T as ObjectSubclass>::Type) -> &T
source§fn ref_counted(&self) -> ObjectImplRef<T>
fn ref_counted(&self) -> ObjectImplRef<T>
self
.