#[repr(transparent)]pub struct Event {
inner: TypedObjectRef<Event, <Event as ObjectSubclass>::ParentType>,
phantom: PhantomData<()>,
}
Expand description
GObject representation of a Matrix room event.
GLib type: GObject with reference counted clone semantics.
Fields§
§inner: TypedObjectRef<Event, <Event as ObjectSubclass>::ParentType>
§phantom: PhantomData<()>
Implementations§
source§impl Event
impl Event
pub fn room(&self) -> <OnceCell<Room> as Property>::Value
pub fn reactions(&self) -> <ReactionList as Property>::Value
pub fn read_receipts(&self) -> <ListStore as Property>::Value
pub fn state(&self) -> <Cell<MessageState> as Property>::Value
pub fn source(&self) -> <PhantomData<Option<String>> as Property>::Value
pub fn has_source(&self) -> <PhantomData<bool> as Property>::Value
pub fn event_id_string( &self, ) -> <PhantomData<Option<String>> as Property>::Value
pub fn timeline_id(&self) -> <String as Property>::Value
pub fn sender_id_string(&self) -> <PhantomData<String> as Property>::Value
pub fn timestamp(&self) -> <PhantomData<DateTime> as Property>::Value
pub fn timestamp_full(&self) -> <PhantomData<String> as Property>::Value
pub fn is_edited(&self) -> <PhantomData<bool> as Property>::Value
pub fn latest_edit_source(&self) -> <PhantomData<String> as Property>::Value
pub fn latest_edit_event_id_string( &self, ) -> <PhantomData<String> as Property>::Value
pub fn latest_edit_timestamp( &self, ) -> <PhantomData<Option<DateTime>> as Property>::Value
pub fn latest_edit_timestamp_full( &self, ) -> <PhantomData<String> as Property>::Value
pub fn is_highlighted(&self) -> <PhantomData<bool> as Property>::Value
pub fn has_read_receipts(&self) -> <PhantomData<bool> as Property>::Value
pub fn connect_room_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
pub fn connect_reactions_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
pub fn connect_read_receipts_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
pub fn connect_state_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
pub fn connect_source_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
pub fn connect_has_source_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
pub fn connect_event_id_string_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
pub fn connect_timeline_id_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
pub fn connect_sender_id_string_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
pub fn connect_timestamp_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
pub fn connect_timestamp_full_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
pub fn connect_is_edited_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
pub fn connect_latest_edit_source_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
pub fn connect_latest_edit_event_id_string_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
pub fn connect_latest_edit_timestamp_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
pub fn connect_latest_edit_timestamp_full_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
pub fn connect_is_highlighted_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
pub fn connect_has_read_receipts_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
pub fn notify_room(&self)
pub fn notify_reactions(&self)
pub fn notify_read_receipts(&self)
pub fn notify_state(&self)
pub fn notify_source(&self)
pub fn notify_has_source(&self)
pub fn notify_event_id_string(&self)
pub fn notify_timeline_id(&self)
pub fn notify_sender_id_string(&self)
pub fn notify_timestamp(&self)
pub fn notify_timestamp_full(&self)
pub fn notify_is_edited(&self)
pub fn notify_latest_edit_source(&self)
pub fn notify_latest_edit_event_id_string(&self)
pub fn notify_latest_edit_timestamp(&self)
pub fn notify_latest_edit_timestamp_full(&self)
pub fn notify_is_highlighted(&self)
pub fn notify_has_read_receipts(&self)
source§impl Event
impl Event
sourcepub fn new(item: EventTimelineItem, timeline_id: &str, room: &Room) -> Self
pub fn new(item: EventTimelineItem, timeline_id: &str, room: &Room) -> Self
Create a new Event
with the given SDK timeline item.
sourcepub fn try_update_with(
&self,
item: &EventTimelineItem,
timeline_id: &str,
) -> bool
pub fn try_update_with( &self, item: &EventTimelineItem, timeline_id: &str, ) -> bool
Try to update this Event
with the given SDK timeline item.
Returns true
if the update succeeded.
sourcepub fn item(&self) -> EventTimelineItem
pub fn item(&self) -> EventTimelineItem
The underlying SDK timeline item.
sourcepub fn raw(&self) -> Option<Raw<AnySyncTimelineEvent>>
pub fn raw(&self) -> Option<Raw<AnySyncTimelineEvent>>
The raw JSON source for this Event
, if it has been echoed back
by the server.
sourcepub fn matches_key(&self, key: &EventKey) -> bool
pub fn matches_key(&self, key: &EventKey) -> bool
Whether the given key matches this Event
.
The result can be different from comparing two EventKey
s because an
event can have a transaction ID and an event ID.
sourcepub fn event_id(&self) -> Option<OwnedEventId>
pub fn event_id(&self) -> Option<OwnedEventId>
The event ID of this Event
, if it has been received from the server.
sourcepub fn transaction_id(&self) -> Option<OwnedTransactionId>
pub fn transaction_id(&self) -> Option<OwnedTransactionId>
The transaction ID of this Event
, if it is still pending.
sourcepub fn sender_id(&self) -> OwnedUserId
pub fn sender_id(&self) -> OwnedUserId
The user ID of the sender of this Event
.
sourcepub fn sender(&self) -> Member
pub fn sender(&self) -> Member
The sender of this Event
.
This should only be called when the event’s room members list is available, otherwise it will be created on every call.
sourcepub fn origin_server_ts(&self) -> MilliSecondsSinceUnixEpoch
pub fn origin_server_ts(&self) -> MilliSecondsSinceUnixEpoch
The timestamp of this Event
as the number of milliseconds
since Unix Epoch, if it has been echoed back by the server.
Otherwise it’s the local time when this event was created.
sourcepub fn origin_server_ts_u64(&self) -> u64
pub fn origin_server_ts_u64(&self) -> u64
The timestamp of this Event
as a u64
, if it has been echoed back by
the server.
Otherwise it’s the local time when this event was created.
sourcepub fn is_redacted(&self) -> bool
pub fn is_redacted(&self) -> bool
Whether this Event
is redacted.
sourcepub fn content(&self) -> TimelineItemContent
pub fn content(&self) -> TimelineItemContent
The content to display for this Event
.
sourcepub fn media_message(&self) -> Option<MediaMessage>
pub fn media_message(&self) -> Option<MediaMessage>
The media message of this Event
, if any.
sourcepub fn visual_media_message(&self) -> Option<VisualMediaMessage>
pub fn visual_media_message(&self) -> Option<VisualMediaMessage>
The visual media message of this Event
, if any.
sourcepub fn can_contain_at_room(&self) -> bool
pub fn can_contain_at_room(&self) -> bool
Whether this event might contain an @room
mention.
This means that either it doesn’t have intentional mentions, or it has
intentional mentions and room
is set to true
.
sourcefn compute_state(&self) -> MessageState
fn compute_state(&self) -> MessageState
Compute the current state of this Event
.
sourcefn update_state(&self)
fn update_state(&self)
Update the state of this Event
.
sourcefn update_read_receipts(
&self,
new_read_receipts: &IndexMap<OwnedUserId, Receipt>,
)
fn update_read_receipts( &self, new_read_receipts: &IndexMap<OwnedUserId, Receipt>, )
Update the read receipts list with the given receipts.
sourcepub fn reply_to_id(&self) -> Option<OwnedEventId>
pub fn reply_to_id(&self) -> Option<OwnedEventId>
Get the ID of the event this Event
replies to, if any.
sourcepub fn reply_to_event_content(
&self,
) -> Option<TimelineDetails<Box<RepliedToEvent>>>
pub fn reply_to_event_content( &self, ) -> Option<TimelineDetails<Box<RepliedToEvent>>>
Get the details of the event this Event
replies to, if any.
Returns None(_)
if this event is not a reply.
sourcepub fn reply_to_event(&self) -> Option<Event>
pub fn reply_to_event(&self) -> Option<Event>
Get the event this Event
replies to, if any.
Returns None(_)
if this event is not a reply or if the event was not
found locally.
sourcepub async fn fetch_missing_details(&self) -> Result<(), TimelineError>
pub async fn fetch_missing_details(&self) -> Result<(), TimelineError>
Fetch missing details for this event.
This is a no-op if called for a local event.
sourcepub fn is_message(&self) -> bool
pub fn is_message(&self) -> bool
Whether this Event
is considered a message.
sourcepub fn as_message(&self) -> Option<OriginalSyncRoomMessageEvent>
pub fn as_message(&self) -> Option<OriginalSyncRoomMessageEvent>
Deserialize this Event
as an OriginalSyncRoomMessageEvent
, if
possible.
sourcepub fn counts_as_unread(&self) -> bool
pub fn counts_as_unread(&self) -> bool
Whether this Event
can count as an unread message.
This follows the algorithm in MSC2654, excluding events that we don’t show in the timeline.
sourcepub async fn matrix_to_uri(&self) -> Option<MatrixToUri>
pub async fn matrix_to_uri(&self) -> Option<MatrixToUri>
The matrix.to
URI representation for this event.
Returns None
if we don’t have the ID of the event.
sourcepub async fn matrix_uri(&self) -> Option<MatrixUri>
pub async fn matrix_uri(&self) -> Option<MatrixUri>
The matrix:
URI representation for this event.
Returns None
if we don’t have the ID of the event.
sourcepub fn connect_item_changed<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId
pub fn connect_item_changed<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
Listen to the signal emitted when the SDK item changed.
Trait Implementations§
source§impl HasParamSpec for Event
impl HasParamSpec for Event
source§impl Ord for Event
impl Ord for Event
source§fn cmp(&self, other: &Self) -> Ordering
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) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl ParentClassIs for Event
impl ParentClassIs for Event
type Parent = TimelineItem
source§impl<OT: ObjectType> PartialEq<OT> for Event
impl<OT: ObjectType> PartialEq<OT> for Event
source§impl<OT: ObjectType> PartialOrd<OT> for Event
impl<OT: ObjectType> PartialOrd<OT> for Event
source§impl StaticType for Event
impl StaticType for Event
source§fn static_type() -> Type
fn static_type() -> Type
Self
.impl Eq for Event
impl IsA<TimelineItem> for Event
Auto Trait Implementations§
impl Freeze for Event
impl !RefUnwindSafe for Event
impl !Send for Event
impl !Sync for Event
impl Unpin for Event
impl !UnwindSafe for Event
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> Cast for Twhere
T: ObjectType,
impl<T> Cast for Twhere
T: ObjectType,
source§fn upcast<T>(self) -> Twhere
T: ObjectType,
Self: IsA<T>,
fn upcast<T>(self) -> Twhere
T: ObjectType,
Self: IsA<T>,
T
. Read moresource§fn upcast_ref<T>(&self) -> &Twhere
T: ObjectType,
Self: IsA<T>,
fn upcast_ref<T>(&self) -> &Twhere
T: ObjectType,
Self: IsA<T>,
T
. Read moresource§fn downcast<T>(self) -> Result<T, Self>where
T: ObjectType,
Self: MayDowncastTo<T>,
fn downcast<T>(self) -> Result<T, Self>where
T: ObjectType,
Self: MayDowncastTo<T>,
T
. Read moresource§fn downcast_ref<T>(&self) -> Option<&T>where
T: ObjectType,
Self: MayDowncastTo<T>,
fn downcast_ref<T>(&self) -> Option<&T>where
T: ObjectType,
Self: MayDowncastTo<T>,
T
. Read moresource§fn dynamic_cast<T>(self) -> Result<T, Self>where
T: ObjectType,
fn dynamic_cast<T>(self) -> Result<T, Self>where
T: ObjectType,
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 moresource§fn dynamic_cast_ref<T>(&self) -> Option<&T>where
T: ObjectType,
fn dynamic_cast_ref<T>(&self) -> Option<&T>where
T: ObjectType,
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 moresource§unsafe fn unsafe_cast<T>(self) -> Twhere
T: ObjectType,
unsafe fn unsafe_cast<T>(self) -> Twhere
T: ObjectType,
T
unconditionally. Read moresource§unsafe fn unsafe_cast_ref<T>(&self) -> &Twhere
T: ObjectType,
unsafe fn unsafe_cast_ref<T>(&self) -> &Twhere
T: ObjectType,
&T
unconditionally. Read moresource§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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.source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<O> GObjectExtManualGst for O
impl<O> GObjectExtManualGst for O
fn set_property_from_str(&self, name: &str, value: &str)
source§impl<O> GObjectPropertyExpressionExt for O
impl<O> GObjectPropertyExpressionExt for O
source§fn property_expression(&self, property_name: &str) -> PropertyExpression
fn property_expression(&self, property_name: &str) -> PropertyExpression
source§fn property_expression_weak(&self, property_name: &str) -> PropertyExpression
fn property_expression_weak(&self, property_name: &str) -> PropertyExpression
source§fn this_expression(property_name: &str) -> PropertyExpression
fn this_expression(property_name: &str) -> PropertyExpression
this
object.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> IntoClosureReturnValue for T
impl<T> IntoClosureReturnValue for T
fn into_closure_return_value(self) -> Option<Value>
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<U> IsSubclassableExt for Uwhere
U: IsClass + ParentClassIs,
impl<U> IsSubclassableExt for Uwhere
U: IsClass + ParentClassIs,
fn parent_class_init<T>(class: &mut Class<U>)
fn parent_instance_init<T>(instance: &mut InitializingObject<T>)
source§impl<T> ObjectExt for Twhere
T: ObjectType,
impl<T> ObjectExt for Twhere
T: ObjectType,
source§fn is<U>(&self) -> boolwhere
U: StaticType,
fn is<U>(&self) -> boolwhere
U: StaticType,
true
if the object is an instance of (can be cast to) T
.source§fn object_class(&self) -> &Class<Object>
fn object_class(&self) -> &Class<Object>
ObjectClass
of the object. Read moresource§fn class_of<U>(&self) -> Option<&Class<U>>where
U: IsClass,
fn class_of<U>(&self) -> Option<&Class<U>>where
U: IsClass,
T
. Read moresource§fn interface<U>(&self) -> Option<InterfaceRef<'_, U>>where
U: IsInterface,
fn interface<U>(&self) -> Option<InterfaceRef<'_, U>>where
U: IsInterface,
T
of the object. Read moresource§fn set_property_from_value(&self, property_name: &str, value: &Value)
fn set_property_from_value(&self, property_name: &str, value: &Value)
source§fn set_properties(&self, property_values: &[(&str, &dyn ToValue)])
fn set_properties(&self, property_values: &[(&str, &dyn ToValue)])
source§fn set_properties_from_value(&self, property_values: &[(&str, Value)])
fn set_properties_from_value(&self, property_values: &[(&str, Value)])
source§fn property<V>(&self, property_name: &str) -> Vwhere
V: for<'b> FromValue<'b> + 'static,
fn property<V>(&self, property_name: &str) -> Vwhere
V: for<'b> FromValue<'b> + 'static,
property_name
of the object and cast it to the type V. Read moresource§fn property_value(&self, property_name: &str) -> Value
fn property_value(&self, property_name: &str) -> Value
property_name
of the object. Read moresource§fn property_type(&self, property_name: &str) -> Option<Type>
fn property_type(&self, property_name: &str) -> Option<Type>
property_name
of this object. Read moresource§fn find_property(&self, property_name: &str) -> Option<ParamSpec>
fn find_property(&self, property_name: &str) -> Option<ParamSpec>
ParamSpec
of the property property_name
of this object.source§fn list_properties(&self) -> PtrSlice<ParamSpec>
fn list_properties(&self) -> PtrSlice<ParamSpec>
ParamSpec
of the properties of this object.source§fn freeze_notify(&self) -> PropertyNotificationFreezeGuard
fn freeze_notify(&self) -> PropertyNotificationFreezeGuard
source§unsafe fn set_qdata<QD>(&self, key: Quark, value: QD)where
QD: 'static,
unsafe fn set_qdata<QD>(&self, key: Quark, value: QD)where
QD: 'static,
key
. Read moresource§unsafe fn qdata<QD>(&self, key: Quark) -> Option<NonNull<QD>>where
QD: 'static,
unsafe fn qdata<QD>(&self, key: Quark) -> Option<NonNull<QD>>where
QD: 'static,
key
. Read moresource§unsafe fn steal_qdata<QD>(&self, key: Quark) -> Option<QD>where
QD: 'static,
unsafe fn steal_qdata<QD>(&self, key: Quark) -> Option<QD>where
QD: 'static,
key
. Read moresource§unsafe fn set_data<QD>(&self, key: &str, value: QD)where
QD: 'static,
unsafe fn set_data<QD>(&self, key: &str, value: QD)where
QD: 'static,
key
. Read moresource§unsafe fn data<QD>(&self, key: &str) -> Option<NonNull<QD>>where
QD: 'static,
unsafe fn data<QD>(&self, key: &str) -> Option<NonNull<QD>>where
QD: 'static,
key
. Read moresource§unsafe fn steal_data<QD>(&self, key: &str) -> Option<QD>where
QD: 'static,
unsafe fn steal_data<QD>(&self, key: &str) -> Option<QD>where
QD: 'static,
key
. Read moresource§fn block_signal(&self, handler_id: &SignalHandlerId)
fn block_signal(&self, handler_id: &SignalHandlerId)
source§fn unblock_signal(&self, handler_id: &SignalHandlerId)
fn unblock_signal(&self, handler_id: &SignalHandlerId)
source§fn stop_signal_emission(&self, signal_id: SignalId, detail: Option<Quark>)
fn stop_signal_emission(&self, signal_id: SignalId, detail: Option<Quark>)
source§fn stop_signal_emission_by_name(&self, signal_name: &str)
fn stop_signal_emission_by_name(&self, signal_name: &str)
source§fn connect<F>(
&self,
signal_name: &str,
after: bool,
callback: F,
) -> SignalHandlerId
fn connect<F>( &self, signal_name: &str, after: bool, callback: F, ) -> SignalHandlerId
signal_name
on this object. Read moresource§fn connect_id<F>(
&self,
signal_id: SignalId,
details: Option<Quark>,
after: bool,
callback: F,
) -> SignalHandlerId
fn connect_id<F>( &self, signal_id: SignalId, details: Option<Quark>, after: bool, callback: F, ) -> SignalHandlerId
signal_id
on this object. Read moresource§fn connect_local<F>(
&self,
signal_name: &str,
after: bool,
callback: F,
) -> SignalHandlerId
fn connect_local<F>( &self, signal_name: &str, after: bool, callback: F, ) -> SignalHandlerId
signal_name
on this object. Read moresource§fn connect_local_id<F>(
&self,
signal_id: SignalId,
details: Option<Quark>,
after: bool,
callback: F,
) -> SignalHandlerId
fn connect_local_id<F>( &self, signal_id: SignalId, details: Option<Quark>, after: bool, callback: F, ) -> SignalHandlerId
signal_id
on this object. Read moresource§unsafe fn connect_unsafe<F>(
&self,
signal_name: &str,
after: bool,
callback: F,
) -> SignalHandlerId
unsafe fn connect_unsafe<F>( &self, signal_name: &str, after: bool, callback: F, ) -> SignalHandlerId
signal_name
on this object. Read moresource§unsafe fn connect_unsafe_id<F>(
&self,
signal_id: SignalId,
details: Option<Quark>,
after: bool,
callback: F,
) -> SignalHandlerId
unsafe fn connect_unsafe_id<F>( &self, signal_id: SignalId, details: Option<Quark>, after: bool, callback: F, ) -> SignalHandlerId
signal_id
on this object. Read moresource§fn connect_closure(
&self,
signal_name: &str,
after: bool,
closure: RustClosure,
) -> SignalHandlerId
fn connect_closure( &self, signal_name: &str, after: bool, closure: RustClosure, ) -> SignalHandlerId
signal_name
on this object. Read moresource§fn connect_closure_id(
&self,
signal_id: SignalId,
details: Option<Quark>,
after: bool,
closure: RustClosure,
) -> SignalHandlerId
fn connect_closure_id( &self, signal_id: SignalId, details: Option<Quark>, after: bool, closure: RustClosure, ) -> SignalHandlerId
signal_id
on this object. Read moresource§fn watch_closure(&self, closure: &impl AsRef<Closure>)
fn watch_closure(&self, closure: &impl AsRef<Closure>)
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]) -> Rwhere
R: TryFromClosureReturnValue,
fn emit<R>(&self, signal_id: SignalId, args: &[&dyn ToValue]) -> Rwhere
R: TryFromClosureReturnValue,
source§fn emit_with_values(&self, signal_id: SignalId, args: &[Value]) -> Option<Value>
fn emit_with_values(&self, signal_id: SignalId, args: &[Value]) -> Option<Value>
Self::emit
but takes Value
for the arguments.source§fn emit_by_name<R>(&self, signal_name: &str, args: &[&dyn ToValue]) -> Rwhere
R: TryFromClosureReturnValue,
fn emit_by_name<R>(&self, signal_name: &str, args: &[&dyn ToValue]) -> Rwhere
R: TryFromClosureReturnValue,
source§fn emit_by_name_with_values(
&self,
signal_name: &str,
args: &[Value],
) -> Option<Value>
fn emit_by_name_with_values( &self, signal_name: &str, args: &[Value], ) -> Option<Value>
source§fn emit_by_name_with_details<R>(
&self,
signal_name: &str,
details: Quark,
args: &[&dyn ToValue],
) -> Rwhere
R: TryFromClosureReturnValue,
fn emit_by_name_with_details<R>(
&self,
signal_name: &str,
details: Quark,
args: &[&dyn ToValue],
) -> Rwhere
R: TryFromClosureReturnValue,
source§fn emit_by_name_with_details_and_values(
&self,
signal_name: &str,
details: Quark,
args: &[Value],
) -> Option<Value>
fn emit_by_name_with_details_and_values( &self, signal_name: &str, details: Quark, args: &[Value], ) -> Option<Value>
source§fn emit_with_details<R>(
&self,
signal_id: SignalId,
details: Quark,
args: &[&dyn ToValue],
) -> Rwhere
R: TryFromClosureReturnValue,
fn emit_with_details<R>(
&self,
signal_id: SignalId,
details: Quark,
args: &[&dyn ToValue],
) -> Rwhere
R: TryFromClosureReturnValue,
source§fn emit_with_details_and_values(
&self,
signal_id: SignalId,
details: Quark,
args: &[Value],
) -> Option<Value>
fn emit_with_details_and_values( &self, signal_id: SignalId, details: Quark, args: &[Value], ) -> Option<Value>
source§fn disconnect(&self, handler_id: SignalHandlerId)
fn disconnect(&self, handler_id: SignalHandlerId)
source§fn connect_notify<F>(&self, name: Option<&str>, f: F) -> SignalHandlerId
fn connect_notify<F>(&self, name: Option<&str>, f: F) -> SignalHandlerId
notify
signal of the object. Read moresource§fn connect_notify_local<F>(&self, name: Option<&str>, f: F) -> SignalHandlerId
fn connect_notify_local<F>(&self, name: Option<&str>, f: F) -> SignalHandlerId
notify
signal of the object. Read moresource§unsafe fn connect_notify_unsafe<F>(
&self,
name: Option<&str>,
f: F,
) -> SignalHandlerId
unsafe fn connect_notify_unsafe<F>( &self, name: Option<&str>, f: F, ) -> SignalHandlerId
notify
signal of the object. Read more