pub struct SendHandle { /* private fields */ }
Expand description
A handle to manipulate an event that was scheduled to be sent to a room.
Implementations§
Source§impl SendHandle
impl SendHandle
Sourcepub async fn abort(&self) -> Result<bool, RoomSendQueueStorageError>
pub async fn abort(&self) -> Result<bool, RoomSendQueueStorageError>
Aborts the sending of the event, if it wasn’t sent yet.
Returns true if the sending could be aborted, false if not (i.e. the event had already been sent).
Sourcepub async fn edit_raw(
&self,
new_content: Raw<AnyMessageLikeEventContent>,
event_type: String,
) -> Result<bool, RoomSendQueueStorageError>
pub async fn edit_raw( &self, new_content: Raw<AnyMessageLikeEventContent>, event_type: String, ) -> Result<bool, RoomSendQueueStorageError>
Edits the content of a local echo with a raw event content.
Returns true if the event to be sent was replaced, false if not (i.e. the event had already been sent).
Sourcepub async fn edit(
&self,
new_content: AnyMessageLikeEventContent,
) -> Result<bool, RoomSendQueueStorageError>
pub async fn edit( &self, new_content: AnyMessageLikeEventContent, ) -> Result<bool, RoomSendQueueStorageError>
Edits the content of a local echo with an event content.
Returns true if the event to be sent was replaced, false if not (i.e. the event had already been sent).
Edits the content of a local echo with a media caption.
Will fail if the event to be sent, represented by this send handle, wasn’t a media.
Sourcepub async fn unwedge(&self) -> Result<(), RoomSendQueueError>
pub async fn unwedge(&self) -> Result<(), RoomSendQueueError>
Unwedge a local echo identified by its transaction identifier and try to resend it.
Sourcepub async fn react(
&self,
key: String,
) -> Result<Option<SendReactionHandle>, RoomSendQueueStorageError>
pub async fn react( &self, key: String, ) -> Result<Option<SendReactionHandle>, RoomSendQueueStorageError>
Send a reaction to the event as soon as it’s sent.
If returning Ok(None)
; this means the reaction couldn’t be sent
because the event is already a remote one.
Trait Implementations§
Source§impl Clone for SendHandle
impl Clone for SendHandle
Source§fn clone(&self) -> SendHandle
fn clone(&self) -> SendHandle
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl Freeze for SendHandle
impl !RefUnwindSafe for SendHandle
impl Send for SendHandle
impl Sync for SendHandle
impl Unpin for SendHandle
impl !UnwindSafe for SendHandle
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,
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 more