pub struct JoinRule {
room: WeakRef<Room>,
matrix_join_rule: RefCell<Option<JoinRule>>,
value: Cell<JoinRuleValue>,
can_knock: Cell<bool>,
display_name: RefCell<String>,
membership_room: BoundObject<PillSource>,
we_can_join: Cell<bool>,
anyone_can_join: Cell<bool>,
own_membership_handler: RefCell<Option<SignalHandlerId>>,
}
Fields§
§room: WeakRef<Room>
The room where this join rule apply.
matrix_join_rule: RefCell<Option<JoinRule>>
The current join rule from the SDK.
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.
own_membership_handler: RefCell<Option<SignalHandlerId>>
Implementations§
Source§impl JoinRule
impl JoinRule
Sourcefn register_type()
fn register_type()
Registers the type only once.
Source§impl JoinRule
impl JoinRule
Sourcepub(super) fn update_join_rule(&self, join_rule: &MatrixJoinRule)
pub(super) 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
Source§type ParentType = Object
type ParentType = Object
Source§type Interfaces = ()
type Interfaces = ()
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> 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
.