Struct fractal::session::model::room::Room

source ·
#[repr(transparent)]
pub struct Room { inner: TypedObjectRef<Room, <Room as ObjectSubclass>::ParentType>, phantom: PhantomData<()>, }
Expand description

GObject representation of a Matrix room.

Handles populating the Timeline.

GLib type: GObject with reference counted clone semantics.

Fields§

§inner: TypedObjectRef<Room, <Room as ObjectSubclass>::ParentType>§phantom: PhantomData<()>

Implementations§

source§

impl Room

source

pub fn session(&self) -> <WeakRef<Session> as Property>::Value

source

pub fn room_id_string(&self) -> <PhantomData<String> as Property>::Value

source

pub fn aliases(&self) -> <RoomAliases as Property>::Value

source

pub fn version(&self) -> <PhantomData<String> as Property>::Value

source

pub fn federated(&self) -> <PhantomData<bool> as Property>::Value

source

pub fn name(&self) -> <PhantomData<Option<String>> as Property>::Value

source

pub fn has_avatar(&self) -> <Cell<bool> as Property>::Value

source

pub fn category(&self) -> <Cell<RoomType> as Property>::Value

source

pub fn timeline(&self) -> <OnceCell<Timeline> as Property>::Value

source

pub fn own_member(&self) -> <OnceCell<Member> as Property>::Value

source

pub fn members(&self) -> <WeakRef<MemberList> as Property>::Value

source

pub fn joined_members_count(&self) -> <Cell<u64> as Property>::Value

source

pub fn inviter(&self) -> <RefCell<Option<Member>> as Property>::Value

source

pub fn permissions(&self) -> <Permissions as Property>::Value

source

pub fn latest_activity(&self) -> <Cell<u64> as Property>::Value

source

pub fn is_read(&self) -> <Cell<bool> as Property>::Value

source

pub fn highlight(&self) -> <Cell<HighlightFlags> as Property>::Value

source

pub fn predecessor_id_string( &self ) -> <PhantomData<Option<String>> as Property>::Value

source

pub fn successor_id_string( &self ) -> <PhantomData<Option<String>> as Property>::Value

source

pub fn successor(&self) -> <WeakRef<Room> as Property>::Value

source

pub fn verification( &self ) -> <BoundObjectWeakRef<IdentityVerification> as Property>::Value

source

pub fn set_verification<'a>( &self, value: Option<impl Borrow<<<BoundObjectWeakRef<IdentityVerification> as Property>::Value as HasParamSpec>::SetValue>> )

source

pub fn is_encrypted(&self) -> <Cell<bool> as Property>::Value

source

pub fn typing_list(&self) -> <TypingList as Property>::Value

source

pub fn is_direct(&self) -> <Cell<bool> as Property>::Value

source

pub fn direct_member(&self) -> <RefCell<Option<Member>> as Property>::Value

source

pub fn notification_count(&self) -> <PhantomData<u64> as Property>::Value

source

pub fn topic(&self) -> <PhantomData<Option<String>> as Property>::Value

source

pub fn is_tombstoned(&self) -> <PhantomData<bool> as Property>::Value

source

pub fn notifications_setting( &self ) -> <Cell<NotificationsRoomSetting> as Property>::Value

source

pub fn set_notifications_setting<'a>( &self, value: impl Borrow<<<Cell<NotificationsRoomSetting> as Property>::Value as HasParamSpec>::SetValue> )

source

pub fn join_rule(&self) -> <JoinRule as Property>::Value

source

pub fn guests_allowed(&self) -> <Cell<bool> as Property>::Value

source

pub fn history_visibility( &self ) -> <Cell<HistoryVisibilityValue> as Property>::Value

source

pub fn connect_session_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId

source

pub fn connect_room_id_string_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId

source

pub fn connect_aliases_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId

source

pub fn connect_version_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId

source

pub fn connect_federated_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId

source

pub fn connect_name_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId

source

pub fn connect_has_avatar_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId

source

pub fn connect_category_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId

source

pub fn connect_timeline_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId

source

pub fn connect_own_member_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId

source

pub fn connect_members_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId

source

pub fn connect_joined_members_count_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId

source

pub fn connect_inviter_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId

source

pub fn connect_permissions_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId

source

pub fn connect_latest_activity_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId

source

pub fn connect_is_read_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId

source

pub fn connect_highlight_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId

source

pub fn connect_predecessor_id_string_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId

source

pub fn connect_successor_id_string_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId

source

pub fn connect_successor_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId

source

pub fn connect_verification_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId

source

pub fn connect_is_encrypted_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId

source

pub fn connect_typing_list_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId

source

pub fn connect_is_direct_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId

source

pub fn connect_direct_member_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId

source

pub fn connect_notification_count_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId

source

pub fn connect_topic_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId

source

pub fn connect_is_tombstoned_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId

source

pub fn connect_notifications_setting_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId

source

pub fn connect_join_rule_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId

source

pub fn connect_guests_allowed_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId

source

pub fn connect_history_visibility_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId

source

pub fn notify_session(&self)

source

pub fn notify_room_id_string(&self)

source

pub fn notify_aliases(&self)

source

pub fn notify_version(&self)

source

pub fn notify_federated(&self)

source

pub fn notify_name(&self)

source

pub fn notify_has_avatar(&self)

source

pub fn notify_category(&self)

source

pub fn notify_timeline(&self)

source

pub fn notify_own_member(&self)

source

pub fn notify_members(&self)

source

pub fn notify_joined_members_count(&self)

source

pub fn notify_inviter(&self)

source

pub fn notify_permissions(&self)

source

pub fn notify_latest_activity(&self)

source

pub fn notify_is_read(&self)

source

pub fn notify_highlight(&self)

source

pub fn notify_predecessor_id_string(&self)

source

pub fn notify_successor_id_string(&self)

source

pub fn notify_successor(&self)

source

pub fn notify_verification(&self)

source

pub fn notify_is_encrypted(&self)

source

pub fn notify_typing_list(&self)

source

pub fn notify_is_direct(&self)

source

pub fn notify_direct_member(&self)

source

pub fn notify_notification_count(&self)

source

pub fn notify_topic(&self)

source

pub fn notify_is_tombstoned(&self)

source

pub fn notify_notifications_setting(&self)

source

pub fn notify_join_rule(&self)

source

pub fn notify_guests_allowed(&self)

source

pub fn notify_history_visibility(&self)

source§

impl Room

source

pub fn new( session: &Session, matrix_room: MatrixRoom, metainfo: Option<RoomMetainfo> ) -> Self

source

pub fn matrix_room(&self) -> &MatrixRoom

The room API of the SDK.

source

fn set_matrix_room(&self, matrix_room: MatrixRoom)

Set the room API of the SDK.

source

fn init_timeline(&self)

source

pub fn room_id(&self) -> &RoomId

The ID of this room.

source

pub fn alias(&self) -> Option<OwnedRoomAliasId>

The alias of this room.

source

pub fn state(&self) -> RoomState

The state of the room.

source

fn set_is_direct(&self, is_direct: bool)

Set whether this room is a direct chat.

source

pub async fn load_is_direct(&self)

Load whether the room is direct or not.

source

async fn direct_user_id(&self) -> Option<OwnedUserId>

The ID of the other user, if this is a direct chat and there is only one other user.

source

fn set_direct_member(&self, member: Option<Member>)

Set the other member of the room, if this room is a direct chat and there is only one other member..

source

async fn load_direct_member(&self)

Load the other member of the room, if this room is a direct chat and there is only one other member.

source

pub async fn ensure_direct_user(&self) -> Result<(), ()>

Ensure the direct user of this room is an active member.

If there is supposed to be a direct user in this room but they have left it, re-invite them.

This is a noop if there is no supposed direct user or if the user is already an active member.

source

pub async fn forget(&self) -> MatrixResult<()>

Forget a room that is left.

source

pub fn is_joined(&self) -> bool

Whether this room is joined.

source

fn set_category_internal(&self, category: RoomType)

source

pub async fn set_category(&self, category: RoomType) -> MatrixResult<()>

Set the category of this room.

This makes the necessary to propagate the category to the homeserver.

Note: Rooms can’t be moved to the invite category and they can’t be moved once they are upgraded.

source

fn load_category(&self)

Load the category from the SDK.

source

async fn watch_room_info(&self)

source

fn update_room_info(&self, room_info: RoomInfo)

source

fn set_up_typing(&self)

Start listening to typing events.

source

fn set_up_receipts(&self)

Start listening to read receipts events.

source

fn handle_receipt_event(&self, content: ReceiptEventContent)

source

fn handle_typing_event(&self, content: TypingEventContent)

source

async fn load_own_member(&self)

Create and load our own member from the store.

source

pub fn get_or_create_members(&self) -> MemberList

The members of this room.

This creates the MemberList if no strong reference to it exists.

source

fn set_joined_members_count(&self, count: u64)

Set the number of joined members in the room, according to the homeserver.

source

fn update_highlight(&self)

source

fn set_highlight(&self, highlight: HighlightFlags)

Set how this room is highlighted.

source

async fn update_is_read(&self)

source

fn set_is_read(&self, is_read: bool)

Set whether all messages of this room are read.

source

async fn load_display_name(&self)

Load the display name from the SDK.

source

async fn load_inviter(&self)

Load the member that invited us to this room, when applicable.

source

pub fn update_for_events(&self, batch: Vec<SyncTimelineEvent>)

Update the room state based on the new sync response FIXME: We should use the sdk’s event handler to get updates

source

fn set_latest_activity(&self, latest_activity: u64)

Set the timestamp of the room’s latest possibly unread event.

source

pub async fn toggle_reaction( &self, key: String, relates_to: OwnedEventId ) -> Result<(), ()>

Toggle a key reaction for the relates_to event ID in this room.

source

pub async fn redact<'a>( &self, events: &'a [OwnedEventId], reason: Option<String> ) -> Result<(), Vec<&'a EventId>>

Redact the given events in this room because of the given reason.

Returns Ok(()) if all the redactions are successful, otherwise returns the list of events that could not be redacted.

source

pub fn send_typing_notification(&self, is_typing: bool)

source

pub async fn accept_invite(&self) -> MatrixResult<()>

source

pub async fn decline_invite(&self) -> MatrixResult<()>

source

pub fn update_room(&self)

Reload the room from the SDK when its state might have changed.

source

pub fn handle_left_update(&self, update: LeftRoomUpdate)

source

pub fn handle_joined_update(&self, update: JoinedRoomUpdate)

source

fn handle_ambiguity_changes<'a>( &self, changes: impl Iterator<Item = &'a AmbiguityChange> )

Handle changes in the ambiguity of members display names.

source

pub fn connect_room_forgotten<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId

Connect to the signal emitted when the room was forgotten.

source

pub fn predecessor_id(&self) -> Option<&OwnedRoomId>

The ID of the predecessor of this room, if this room is an upgrade to a previous room.

source

fn load_predecessor(&self)

Load the predecessor of this room.

source

pub fn successor_id(&self) -> Option<&RoomId>

The ID of the successor of this Room, if this room was upgraded.

source

fn set_successor(&self, successor: &Room)

Set the successor of this Room.

source

pub fn load_tombstone(&self)

Load the tombstone for this room.

source

pub fn update_outdated(&self) -> bool

Update whether this Room is outdated.

A room is outdated when it was tombstoned and we joined its successor.

Returns true if the Room was set as outdated, false otherwise.

source

pub async fn invite<'a>( &self, user_ids: &'a [OwnedUserId] ) -> Result<(), Vec<&'a UserId>>

Invite the given users to this room.

Returns Ok(()) if all the invites are sent successfully, otherwise returns the list of users who could not be invited.

source

pub async fn kick<'a>( &self, users: &'a [(OwnedUserId, Option<String>)] ) -> Result<(), Vec<&'a UserId>>

Kick the given users from this room.

The users are a list of (user_id, reason) tuples.

Returns Ok(()) if all the kicks are sent successfully, otherwise returns the list of users who could not be kicked.

source

pub async fn ban<'a>( &self, users: &'a [(OwnedUserId, Option<String>)] ) -> Result<(), Vec<&'a UserId>>

Ban the given users from this room.

The users are a list of (user_id, reason) tuples.

Returns Ok(()) if all the bans are sent successfully, otherwise returns the list of users who could not be banned.

source

pub async fn unban<'a>( &self, users: &'a [(OwnedUserId, Option<String>)] ) -> Result<(), Vec<&'a UserId>>

Unban the given users from this room.

The users are a list of (user_id, reason) tuples.

Returns Ok(()) if all the unbans are sent successfully, otherwise returns the list of users who could not be unbanned.

source

pub fn update_latest_activity<'a>( &self, events: impl IntoIterator<Item = &'a Event> )

Update the latest activity of the room with the given events.

The events must be in reverse chronological order.

source

fn set_up_is_encrypted(&self)

Listen to changes in room encryption.

source

async fn load_is_encrypted(&self)

Load whether the room is encrypted from the SDK.

source

pub async fn enable_encryption(&self) -> Result<(), ()>

Enable encryption for this room.

source

pub fn human_readable_id(&self) -> String

Get a human-readable ID for this Room.

This is to identify the room easily in logs.

source

fn update_avatar(&self)

Update the avatar for the room.

source

pub async fn matrix_to_uri(&self) -> MatrixToUri

The matrix.to URI representation for this room.

source

pub async fn matrix_uri(&self) -> MatrixUri

The matrix: URI representation for this room.

source

pub async fn matrix_to_event_uri(&self, event_id: OwnedEventId) -> MatrixToUri

The matrix.to URI representation for the given event in this room.

source

pub async fn matrix_event_uri(&self, event_id: OwnedEventId) -> MatrixUri

The matrix: URI representation for the given event in this room.

source

pub async fn report_events<'a>( &self, events: &'a [(OwnedEventId, Option<String>)] ) -> Result<(), Vec<&'a EventId>>

Report the given events in this room.

The events are a list of (event_id, reason) tuples.

Returns Ok(()) if all the reports are sent successfully, otherwise returns the list of event IDs that could not be reported.

source

fn update_guests_allowed(&self)

Update whether guests are allowed.

source

fn update_history_visibility(&self)

Update the visibility of the history.

source

pub fn at_room(&self) -> AtRoom

Constructs an AtRoom for this room.

Trait Implementations§

source§

impl Clone for Room

source§

fn clone(&self) -> Self

Makes a clone of this shared reference.

This increments the strong reference count of the object. Dropping the object will decrement it again.

1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Room

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl HasParamSpec for Room

§

type ParamSpec = ParamSpecObject

§

type SetValue = Room

Preferred value to be used as setter for the associated ParamSpec.
§

type BuilderFn = fn(_: &str) -> ParamSpecObjectBuilder<'_, Room>

source§

fn param_spec_builder() -> Self::BuilderFn

source§

impl Hash for Room

source§

fn hash<H>(&self, state: &mut H)
where H: Hasher,

Hashes the memory address of this object.

1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl ObjectSubclassIs for Room

source§

impl Ord for Room

source§

fn cmp(&self, other: &Self) -> Ordering

Comparison for two GObjects.

Compares the memory addresses of the provided objects.

1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl ParentClassIs for Room

source§

impl<OT: ObjectType> PartialEq<OT> for Room

source§

fn eq(&self, other: &OT) -> bool

Equality for two GObjects.

Two GObjects are equal if their memory addresses are equal.

1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<OT: ObjectType> PartialOrd<OT> for Room

source§

fn partial_cmp(&self, other: &OT) -> Option<Ordering>

Partial comparison for two GObjects.

Compares the memory addresses of the provided objects.

1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl StaticType for Room

source§

fn static_type() -> Type

Returns the type identifier of Self.
source§

impl Eq for Room

source§

impl IsA<PillSource> for Room

Auto Trait Implementations§

§

impl Freeze for Room

§

impl !RefUnwindSafe for Room

§

impl !Send for Room

§

impl !Sync for Room

§

impl Unpin for Room

§

impl !UnwindSafe for Room

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> Cast for T
where T: ObjectType,

source§

fn upcast<T>(self) -> T
where T: ObjectType, Self: IsA<T>,

Upcasts an object to a superclass or interface T. Read more
source§

fn upcast_ref<T>(&self) -> &T
where T: ObjectType, Self: IsA<T>,

Upcasts an object to a reference of its superclass or interface T. Read more
source§

fn downcast<T>(self) -> Result<T, Self>
where T: ObjectType, Self: MayDowncastTo<T>,

Tries to downcast to a subclass or interface implementor T. Read more
source§

fn downcast_ref<T>(&self) -> Option<&T>
where T: ObjectType, Self: MayDowncastTo<T>,

Tries to downcast to a reference of its subclass or interface implementor T. Read more
source§

fn dynamic_cast<T>(self) -> Result<T, Self>
where T: ObjectType,

Tries to cast to an object of type T. This handles upcasting, downcasting and casting between interface and interface implementors. All checks are performed at runtime, while upcast will do many checks at compile-time already. downcast will perform the same checks at runtime as dynamic_cast, but will also ensure some amount of compile-time safety. Read more
source§

fn dynamic_cast_ref<T>(&self) -> Option<&T>
where T: ObjectType,

Tries to cast to reference to an object of type T. This handles upcasting, downcasting and casting between interface and interface implementors. All checks are performed at runtime, while downcast and upcast will do many checks at compile-time already. Read more
source§

unsafe fn unsafe_cast<T>(self) -> T
where T: ObjectType,

Casts to T unconditionally. Read more
source§

unsafe fn unsafe_cast_ref<T>(&self) -> &T
where T: ObjectType,

Casts to &T unconditionally. Read more
source§

impl<Q, K> Comparable<K> for Q
where Q: Ord + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for T

source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for T

source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for T

source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for T

source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for T

source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for T

source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for T

source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for T

source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for T

source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for T

source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for T

source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for T

source§

impl<T> FromRef<T> for T
where T: Clone,

source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
source§

impl<O> GObjectExtManualGst for O
where O: IsA<Object>,

source§

fn set_property_from_str(&self, name: &str, value: &str)

source§

impl<O> GObjectPropertyExpressionExt for O
where O: IsA<Object>,

source§

fn property_expression(&self, property_name: &str) -> PropertyExpression

Create an expression looking up an object’s property.
source§

fn property_expression_weak(&self, property_name: &str) -> PropertyExpression

Create an expression looking up an object’s property with a weak reference.
source§

fn this_expression(property_name: &str) -> PropertyExpression

Create an expression looking up a property in the bound this object.
source§

impl<T, W> HasTypeWitness<W> for T
where W: MakeTypeWitness<Arg = T>, T: ?Sized,

source§

const WITNESS: W = W::MAKE

A constant of the type witness
source§

impl<T> Identity for T
where T: ?Sized,

§

type Type = T

The same type as Self, used to emulate type equality bounds (T == U) with associated type equality constraints (T: Identity<Type = U>).
source§

const TYPE_EQ: TypeEq<T, <T as Identity>::Type> = TypeEq::NEW

Proof that Self is the same type as Self::Type, provides methods for casting between Self and Self::Type.
source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoClosureReturnValue for T
where T: Into<Value>,

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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 more
source§

impl<U> IsSubclassableExt for U

source§

impl<T> ObjectExt for T
where T: ObjectType,

source§

fn is<U>(&self) -> bool
where U: StaticType,

Returns true if the object is an instance of (can be cast to) T.
source§

fn type_(&self) -> Type

Returns the type of the object.
source§

fn object_class(&self) -> &Class<Object>

Returns the ObjectClass of the object. Read more
source§

fn class(&self) -> &Class<T>
where T: IsClass,

Returns the class of the object.
source§

fn class_of<U>(&self) -> Option<&Class<U>>
where U: IsClass,

Returns the class of the object in the given type T. Read more
source§

fn interface<U>(&self) -> Option<InterfaceRef<'_, U>>
where U: IsInterface,

Returns the interface T of the object. Read more
source§

fn set_property(&self, property_name: &str, value: impl Into<Value>)

Sets the property property_name of the object to value value. Read more
source§

fn set_property_from_value(&self, property_name: &str, value: &Value)

Sets the property property_name of the object to value value. Read more
source§

fn set_properties(&self, property_values: &[(&str, &dyn ToValue)])

Sets multiple properties of the object at once. Read more
source§

fn set_properties_from_value(&self, property_values: &[(&str, Value)])

Sets multiple properties of the object at once. Read more
source§

fn property<V>(&self, property_name: &str) -> V
where V: for<'b> FromValue<'b> + 'static,

Gets the property property_name of the object and cast it to the type V. Read more
source§

fn property_value(&self, property_name: &str) -> Value

Gets the property property_name of the object. Read more
source§

fn has_property(&self, property_name: &str, type_: Option<Type>) -> bool

Check if the object has a property property_name of the given type_. Read more
source§

fn property_type(&self, property_name: &str) -> Option<Type>

Get the type of the property property_name of this object. Read more
source§

fn find_property(&self, property_name: &str) -> Option<ParamSpec>

Get the ParamSpec of the property property_name of this object.
source§

fn list_properties(&self) -> PtrSlice<ParamSpec>

Return all ParamSpec of the properties of this object.
source§

fn freeze_notify(&self) -> PropertyNotificationFreezeGuard

Freeze all property notifications until the return guard object is dropped. Read more
source§

unsafe fn set_qdata<QD>(&self, key: Quark, value: QD)
where QD: 'static,

Set arbitrary data on this object with the given key. Read more
source§

unsafe fn qdata<QD>(&self, key: Quark) -> Option<NonNull<QD>>
where QD: 'static,

Return previously set arbitrary data of this object with the given key. Read more
source§

unsafe fn steal_qdata<QD>(&self, key: Quark) -> Option<QD>
where QD: 'static,

Retrieve previously set arbitrary data of this object with the given key. Read more
source§

unsafe fn set_data<QD>(&self, key: &str, value: QD)
where QD: 'static,

Set arbitrary data on this object with the given key. Read more
source§

unsafe fn data<QD>(&self, key: &str) -> Option<NonNull<QD>>
where QD: 'static,

Return previously set arbitrary data of this object with the given key. Read more
source§

unsafe fn steal_data<QD>(&self, key: &str) -> Option<QD>
where QD: 'static,

Retrieve previously set arbitrary data of this object with the given key. Read more
source§

fn block_signal(&self, handler_id: &SignalHandlerId)

Block a given signal handler. Read more
source§

fn unblock_signal(&self, handler_id: &SignalHandlerId)

Unblock a given signal handler.
source§

fn stop_signal_emission(&self, signal_id: SignalId, detail: Option<Quark>)

Stop emission of the currently emitted signal.
source§

fn stop_signal_emission_by_name(&self, signal_name: &str)

Stop emission of the currently emitted signal by the (possibly detailed) signal name.
source§

fn connect<F>( &self, signal_name: &str, after: bool, callback: F ) -> SignalHandlerId
where F: Fn(&[Value]) -> Option<Value> + Send + Sync + 'static,

Connect to the signal signal_name on this object. Read more
source§

fn connect_id<F>( &self, signal_id: SignalId, details: Option<Quark>, after: bool, callback: F ) -> SignalHandlerId
where F: Fn(&[Value]) -> Option<Value> + Send + Sync + 'static,

Connect to the signal signal_id on this object. Read more
source§

fn connect_local<F>( &self, signal_name: &str, after: bool, callback: F ) -> SignalHandlerId
where F: Fn(&[Value]) -> Option<Value> + 'static,

Connect to the signal signal_name on this object. Read more
source§

fn connect_local_id<F>( &self, signal_id: SignalId, details: Option<Quark>, after: bool, callback: F ) -> SignalHandlerId
where F: Fn(&[Value]) -> Option<Value> + 'static,

Connect to the signal signal_id on this object. Read more
source§

unsafe fn connect_unsafe<F>( &self, signal_name: &str, after: bool, callback: F ) -> SignalHandlerId
where F: Fn(&[Value]) -> Option<Value>,

Connect to the signal signal_name on this object. Read more
source§

unsafe fn connect_unsafe_id<F>( &self, signal_id: SignalId, details: Option<Quark>, after: bool, callback: F ) -> SignalHandlerId
where F: Fn(&[Value]) -> Option<Value>,

Connect to the signal signal_id on this object. Read more
source§

fn connect_closure( &self, signal_name: &str, after: bool, closure: RustClosure ) -> SignalHandlerId

Connect a closure to the signal signal_name on this object. Read more
source§

fn connect_closure_id( &self, signal_id: SignalId, details: Option<Quark>, after: bool, closure: RustClosure ) -> SignalHandlerId

Connect a closure to the signal signal_id on this object. Read more
source§

fn watch_closure(&self, closure: &impl AsRef<Closure>)

Limits the lifetime of closure to the lifetime of the object. When the object’s reference count drops to zero, the closure will be invalidated. An invalidated closure will ignore any calls to invoke_with_values, or invoke when using Rust closures.
source§

fn emit<R>(&self, signal_id: SignalId, args: &[&dyn ToValue]) -> R

Emit signal by signal id. Read more
source§

fn emit_with_values(&self, signal_id: SignalId, args: &[Value]) -> Option<Value>

Same as Self::emit but takes Value for the arguments.
source§

fn emit_by_name<R>(&self, signal_name: &str, args: &[&dyn ToValue]) -> R

Emit signal by its name. Read more
source§

fn emit_by_name_with_values( &self, signal_name: &str, args: &[Value] ) -> Option<Value>

Emit signal by its name. Read more
source§

fn emit_by_name_with_details<R>( &self, signal_name: &str, details: Quark, args: &[&dyn ToValue] ) -> R

Emit signal by its name with details. Read more
source§

fn emit_by_name_with_details_and_values( &self, signal_name: &str, details: Quark, args: &[Value] ) -> Option<Value>

Emit signal by its name with details. Read more
source§

fn emit_with_details<R>( &self, signal_id: SignalId, details: Quark, args: &[&dyn ToValue] ) -> R

Emit signal by signal id with details. Read more
source§

fn emit_with_details_and_values( &self, signal_id: SignalId, details: Quark, args: &[Value] ) -> Option<Value>

Emit signal by signal id with details. Read more
source§

fn disconnect(&self, handler_id: SignalHandlerId)

Disconnect a previously connected signal handler.
source§

fn connect_notify<F>(&self, name: Option<&str>, f: F) -> SignalHandlerId
where F: Fn(&T, &ParamSpec) + Send + Sync + 'static,

Connect to the notify signal of the object. Read more
source§

fn connect_notify_local<F>(&self, name: Option<&str>, f: F) -> SignalHandlerId
where F: Fn(&T, &ParamSpec) + 'static,

Connect to the notify signal of the object. Read more
source§

unsafe fn connect_notify_unsafe<F>( &self, name: Option<&str>, f: F ) -> SignalHandlerId
where F: Fn(&T, &ParamSpec),

Connect to the notify signal of the object. Read more
source§

fn notify(&self, property_name: &str)

Notify that the given property has changed its value. Read more
source§

fn notify_by_pspec(&self, pspec: &ParamSpec)

Notify that the given property has changed its value. Read more
source§

fn downgrade(&self) -> WeakRef<T>

Downgrade this object to a weak reference.
source§

fn add_weak_ref_notify<F>(&self, f: F) -> WeakRefNotify<T>
where F: FnOnce() + Send + 'static,

Add a callback to be notified when the Object is disposed.
source§

fn add_weak_ref_notify_local<F>(&self, f: F) -> WeakRefNotify<T>
where F: FnOnce() + 'static,

Add a callback to be notified when the Object is disposed. Read more
source§

fn bind_property<'a, 'f, 't, O>( &'a self, source_property: &'a str, target: &'a O, target_property: &'a str ) -> BindingBuilder<'a, 'f, 't>
where O: ObjectType,

Bind property source_property on this object to the target_property on the target object. Read more
source§

fn ref_count(&self) -> u32

Returns the strong reference count of this object.
source§

unsafe fn run_dispose(&self)

Runs the dispose mechanism of the object. Read more
source§

impl<T, S> ObjectSubclassIsExt for T
where T: ObjectSubclassIs<Subclass = S>, S: ObjectSubclass<Type = T>,

source§

fn imp(&self) -> &<T as ObjectSubclassIs>::Subclass

Returns the implementation (the private Rust struct) of this class instance
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Property for T
where T: HasParamSpec,

§

type Value = T

source§

impl<T> PropertyGet for T
where T: HasParamSpec,

§

type Value = T

source§

fn get<R, F>(&self, f: F) -> R
where F: Fn(&<T as PropertyGet>::Value) -> R,

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> StaticTypeExt for T
where T: StaticType,

source§

fn ensure_type()

Ensures that the type has been registered with the type system.
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> TransparentType for T

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T> TryFromClosureReturnValue for T
where T: for<'a> FromValue<'a> + StaticType + 'static,

source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> Any for T
where T: Any,

source§

impl<T> CloneAny for T
where T: Any + Clone,

source§

impl<'a, T, C, E> FromValueOptional<'a> for T
where T: FromValue<'a, Checker = C>, C: ValueTypeChecker<Error = ValueTypeMismatchOrNoneError<E>>, E: Error + Send + 'static,

source§

impl<A, B, T> HttpServerConnExec<A, B> for T
where B: Body,

source§

impl<Super, Sub> MayDowncastTo<Sub> for Super
where Super: IsA<Super>, Sub: IsA<Super>,