Struct DelayedEventData
#[non_exhaustive]pub struct DelayedEventData {
pub delay_id: String,
pub room_id: OwnedRoomId,
pub event_type: TimelineEventType,
pub state_key: Option<String>,
pub content: Raw<AnyTimelineEventContent>,
pub delay: Duration,
pub running_since: MilliSecondsSinceUnixEpoch,
pub error: Option<StandardErrorBody>,
pub event_id: Option<OwnedEventId>,
pub finalized_ts: Option<MilliSecondsSinceUnixEpoch>,
}api and (crate features client or server) and crate feature unstable-msc4140 only.Expand description
The structure of the data for returning a delayed event from a GET endpoint
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.delay_id: StringThe ID of the delayed event.
room_id: OwnedRoomIdThe ID of the room that the delayed event was scheduled to be sent in.
event_type: TimelineEventTypeThe event type of the delayed event.
state_key: Option<String>The State Key if the event is a state event, nothing otherwise
content: Raw<AnyTimelineEventContent>The event content to send.
This is the content that was submitted to the send endpoint, not the content of the final event
delay: DurationThe duration that the server should wait before sending this event
running_since: MilliSecondsSinceUnixEpochThe timestamp when the delayed event was scheduled or last restarted.
error: Option<StandardErrorBody>The error that prevented the delayed event from being sent. Present only for finalized events that were cancelled due to an error.
event_id: Option<OwnedEventId>The event_id this event got when it was sent. Present only for events that were sent successfully.
finalized_ts: Option<MilliSecondsSinceUnixEpoch>The timestamp when the event was finalized. Present only for events that were finalized (sent, failed to send, or cancelled).
Implementations§
§impl DelayedEventData
impl DelayedEventData
pub fn new(
delay_id: String,
room_id: OwnedRoomId,
event_type: TimelineEventType,
state_key: Option<String>,
content: Raw<AnyTimelineEventContent>,
delay: Duration,
running_since: MilliSecondsSinceUnixEpoch,
) -> DelayedEventData
pub fn new( delay_id: String, room_id: OwnedRoomId, event_type: TimelineEventType, state_key: Option<String>, content: Raw<AnyTimelineEventContent>, delay: Duration, running_since: MilliSecondsSinceUnixEpoch, ) -> DelayedEventData
Create a new delayed event data object with the given parameters
pub fn status(&self) -> DelayedEventStatus
pub fn status(&self) -> DelayedEventStatus
Returns the status indicated by this delayed event data.
Trait Implementations§
§impl Clone for DelayedEventData
impl Clone for DelayedEventData
§fn clone(&self) -> DelayedEventData
fn clone(&self) -> DelayedEventData
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for DelayedEventData
impl Debug for DelayedEventData
§impl<'de> Deserialize<'de> for DelayedEventData
impl<'de> Deserialize<'de> for DelayedEventData
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<DelayedEventData, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<DelayedEventData, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
§impl From<DelayedEventData> for Response
impl From<DelayedEventData> for Response
§fn from(delayed_event: DelayedEventData) -> Response
fn from(delayed_event: DelayedEventData) -> Response
§impl Serialize for DelayedEventData
impl Serialize for DelayedEventData
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Auto Trait Implementations§
impl Freeze for DelayedEventData
impl RefUnwindSafe for DelayedEventData
impl Send for DelayedEventData
impl Sync for DelayedEventData
impl Unpin for DelayedEventData
impl UnsafeUnpin for DelayedEventData
impl UnwindSafe for DelayedEventData
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> CompatExt for T
impl<T> CompatExt for T
Source§impl<T> DropFlavorWrapper<T> for T
impl<T> DropFlavorWrapper<T> for T
§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
§unsafe fn consume_handle(handle: Handle) -> Arc<T>
unsafe fn consume_handle(handle: Handle) -> Arc<T>
Arc<> Read moreSource§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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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 more