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 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
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
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
Mutably borrows from an owned value. Read more
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)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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>
Converts
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>
Converts
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