pub struct Event {Show 18 fields
item: RefCell<Option<Arc<EventTimelineItem>>>,
event_id_string: PhantomData<Option<String>>,
sender_id_string: PhantomData<String>,
timestamp: PhantomData<DateTime>,
formatted_timestamp: PhantomData<String>,
source: PhantomData<Option<String>>,
has_source: PhantomData<bool>,
state: Cell<MessageState>,
is_edited: PhantomData<bool>,
latest_edit_source: PhantomData<String>,
latest_edit_event_id_string: PhantomData<String>,
latest_edit_timestamp: PhantomData<Option<DateTime>>,
latest_edit_formatted_timestamp: PhantomData<String>,
is_highlighted: PhantomData<bool>,
reactions: ReactionList,
read_receipts: OnceCell<ListStore>,
has_read_receipts: PhantomData<bool>,
header_state: Cell<EventHeaderState>,
}Fields§
§item: RefCell<Option<Arc<EventTimelineItem>>>The underlying SDK timeline item.
event_id_string: PhantomData<Option<String>>The global permanent ID of this event, if it has been received from the server, as a string.
sender_id_string: PhantomData<String>The ID of the sender of this event, as a string.
timestamp: PhantomData<DateTime>The timestamp of this event, as a GDateTime.
formatted_timestamp: PhantomData<String>The formatted timestamp of this event.
source: PhantomData<Option<String>>The pretty-formatted JSON source, if it has been echoed back by the server.
has_source: PhantomData<bool>Whether we have the JSON source of this event.
state: Cell<MessageState>The state of this event.
is_edited: PhantomData<bool>Whether this event was edited.
latest_edit_source: PhantomData<String>The pretty-formatted JSON source for the latest edit of this event.
This string is empty if the event is not edited.
latest_edit_event_id_string: PhantomData<String>The ID for the latest edit of this event, as a string.
This string is empty if the event is not edited.
latest_edit_timestamp: PhantomData<Option<DateTime>>The timestamp for the latest edit of this event, as a GDateTime,
if any.
latest_edit_formatted_timestamp: PhantomData<String>The formatted timestamp for the latest edit of this event.
This string is empty if the event is not edited.
is_highlighted: PhantomData<bool>Whether this event should be highlighted.
reactions: ReactionListThe reactions on this event.
read_receipts: OnceCell<ListStore>The read receipts on this event.
has_read_receipts: PhantomData<bool>Whether this event has any read receipt.
header_state: Cell<EventHeaderState>The state of the header of the event in the room history.
Implementations§
Source§impl Event
impl Event
Sourcefn register_type()
fn register_type()
Registers the type only once.
Source§impl Event
impl Event
Sourcepub(super) fn identifier(&self) -> TimelineEventItemId
pub(super) fn identifier(&self) -> TimelineEventItemId
The global permanent or temporary identifier of this event.
Sourcepub(super) fn event_id(&self) -> Option<OwnedEventId>
pub(super) fn event_id(&self) -> Option<OwnedEventId>
The global permanent ID of this event, if it has been received from the server.
Sourcefn event_id_string(&self) -> Option<String>
fn event_id_string(&self) -> Option<String>
The global permanent ID of this event, if it has been received from the server, as a string.
Sourcepub(crate) fn transaction_id(&self) -> Option<OwnedTransactionId>
pub(crate) fn transaction_id(&self) -> Option<OwnedTransactionId>
The temporary ID of this event, if it has been sent with this session.
Sourcefn sender_id_string(&self) -> String
fn sender_id_string(&self) -> String
The ID of the sender of this event, as a string.
Sourcepub(super) fn origin_server_ts(&self) -> MilliSecondsSinceUnixEpoch
pub(super) fn origin_server_ts(&self) -> MilliSecondsSinceUnixEpoch
The timestamp of this event, as the number of milliseconds since Unix Epoch.
Sourcefn formatted_timestamp(&self) -> String
fn formatted_timestamp(&self) -> String
The formatted timestamp of this event.
Sourcepub(super) fn raw(&self) -> Option<Raw<AnySyncTimelineEvent>>
pub(super) fn raw(&self) -> Option<Raw<AnySyncTimelineEvent>>
The raw JSON source, if it has been echoed back by the server.
Sourcefn source(&self) -> Option<String>
fn source(&self) -> Option<String>
The pretty-formatted JSON source, if it has been echoed back by the server.
Sourcefn has_source(&self) -> bool
fn has_source(&self) -> bool
Whether we have the JSON source.
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 latest_edit_raw(&self) -> Option<Raw<AnySyncTimelineEvent>>
fn latest_edit_raw(&self) -> Option<Raw<AnySyncTimelineEvent>>
The JSON source for the latest edit of this event, if any.
Sourcefn latest_edit_source(&self) -> String
fn latest_edit_source(&self) -> String
The pretty-formatted JSON source for the latest edit of this event.
This string is empty if the event is not edited.
Sourcefn latest_edit_event_id_string(&self) -> String
fn latest_edit_event_id_string(&self) -> String
The ID of the latest edit of this Event.
This string is empty if the event is not edited.
Sourcefn latest_edit_timestamp(&self) -> Option<DateTime>
fn latest_edit_timestamp(&self) -> Option<DateTime>
The timestamp of the latest edit of this Event, as a GDateTime,
if any.
Sourcefn latest_edit_formatted_timestamp(&self) -> String
fn latest_edit_formatted_timestamp(&self) -> String
The formatted timestamp of the latest edit of this Event.
Sourcefn is_highlighted(&self) -> bool
fn is_highlighted(&self) -> bool
Whether this Event should be highlighted.
Sourcefn read_receipts(&self) -> &ListStore
fn read_receipts(&self) -> &ListStore
The read receipts on this event.
Sourcefn read_receipts_owned(&self) -> ListStore
fn read_receipts_owned(&self) -> ListStore
The owned read receipts on 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.
Sourcefn has_read_receipts(&self) -> bool
fn has_read_receipts(&self) -> bool
Whether this event has any read receipt.
Sourcefn set_header_state(&self, state: EventHeaderState)
fn set_header_state(&self, state: EventHeaderState)
Set the state of the header of the event in the room history.
Trait Implementations§
Source§impl DerivedObjectProperties for Event
impl DerivedObjectProperties for Event
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 Event
impl ObjectImpl for Event
Source§fn constructed(&self)
fn constructed(&self)
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 notify(&self, pspec: &ParamSpec)
fn notify(&self, pspec: &ParamSpec)
self.notify("property").fn dispatch_properties_changed(&self, pspecs: &[ParamSpec])
Source§impl ObjectSubclass for Event
impl ObjectSubclass for Event
Source§type Interfaces = ()
type Interfaces = ()
Source§type ParentType = TimelineItem
type ParentType = TimelineItem
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>)
Source§impl ObjectSubclassType for Event
impl ObjectSubclassType for Event
impl TimelineItemImpl 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 UnsafeUnpin 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, 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 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.