#[non_exhaustive]pub enum SendError {
Client(ClientError),
NotLoggedIn,
Iq(IqError),
InvalidRequest(String),
Internal(Error),
}Expand description
Error returned by the message send path (Client::send_message,
Client::send_text, Client::forward_message, reactions, edits,
revokes, pins, polls, events, comments, status) and the bot
crate::bot::MessageContext helpers.
Wraps the shared ClientError (transport/connection/IQ) and surfaces the
actionable send-time failure modes explicitly. Internal is the last-resort
catch-all for crypto/encoding paths that still thread anyhow internally.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Client(ClientError)
Connection/transport/IQ failure (embeds the shared base error).
NotLoggedIn
The client has no PN/LID identity yet (not paired / mid LID migration).
Iq(IqError)
An IQ issued as part of the send (e.g. a group-info query) failed.
InvalidRequest(String)
The recipient JID or send arguments are invalid for this operation (e.g. a newsletter JID on the E2E path, an empty status recipient list).
Internal(Error)
Catch-all for internal send failures (Signal encrypt, protobuf, group
resolution) that have no dedicated variant yet. Display forwards to
the inner error while source() still exposes it for downcast.
Trait Implementations§
Source§impl Error for SendError
impl Error for SendError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<ClientError> for SendError
impl From<ClientError> for SendError
Source§fn from(err: ClientError) -> Self
fn from(err: ClientError) -> Self
Source§impl From<GroupError> for SendError
impl From<GroupError> for SendError
Source§fn from(err: GroupError) -> Self
fn from(err: GroupError) -> Self
Source§impl From<SendError> for PluginMessagingError
Available on crate feature plugins only.
impl From<SendError> for PluginMessagingError
plugins only.Auto Trait Implementations§
impl !RefUnwindSafe for SendError
impl !UnwindSafe for SendError
impl Freeze for SendError
impl Send for SendError
impl Sync for SendError
impl Unpin for SendError
impl UnsafeUnpin for SendError
Blanket Implementations§
Source§impl<T> AggregateExpressionMethods for T
impl<T> AggregateExpressionMethods for T
Source§fn aggregate_distinct(self) -> Self::Outputwhere
Self: DistinctDsl,
fn aggregate_distinct(self) -> Self::Outputwhere
Self: DistinctDsl,
DISTINCT modifier for aggregate functions Read moreSource§fn aggregate_all(self) -> Self::Outputwhere
Self: AllDsl,
fn aggregate_all(self) -> Self::Outputwhere
Self: AllDsl,
ALL modifier for aggregate functions Read moreSource§fn aggregate_filter<P>(self, f: P) -> Self::Output
fn aggregate_filter<P>(self, f: P) -> Self::Output
Source§fn aggregate_order<O>(self, o: O) -> Self::Outputwhere
Self: OrderAggregateDsl<O>,
fn aggregate_order<O>(self, o: O) -> Self::Outputwhere
Self: OrderAggregateDsl<O>,
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<E> ErrorChainExt for Ewhere
E: Error + 'static,
impl<E> ErrorChainExt for Ewhere
E: Error + 'static,
fn as_dyn_error(&self) -> &(dyn Error + 'static)
Source§fn sources(&self) -> Sources<'_> ⓘ
fn sources(&self) -> Sources<'_> ⓘ
Source§fn server_rejection(&self) -> Option<ServerRejection<'_>>
fn server_rejection(&self) -> Option<ServerRejection<'_>>
Source§fn is_timeout(&self) -> bool
fn is_timeout(&self) -> bool
Source§fn store_failure(&self) -> Option<&StoreError>
fn store_failure(&self) -> Option<&StoreError>
Source§impl<T> IntoSql for T
impl<T> IntoSql for T
Source§fn into_sql<T>(self) -> Self::Expression
fn into_sql<T>(self) -> Self::Expression
self to an expression for Diesel’s query builder. Read moreSource§fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
&self to an expression for Diesel’s query builder. Read moreimpl<T> MaybeSend for T
impl<T> MaybeSendSync for T
impl<T> Spawnable for Twhere
T: Send + 'static,
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString. Read more