Struct matrix_sdk::send_queue::SendHandle
source · 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).
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<T> CompatExt for T
impl<T> CompatExt for T
source§impl<T> FutureExt for T
impl<T> FutureExt for T
source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
source§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
source§fn consume_handle(handle: Handle) -> Arc<T>
fn consume_handle(handle: Handle) -> Arc<T>
Arc<>
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,
§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