pub struct NoOpSendCallback;Expand description
No-op callback for headless/CLI/test use.
Trait Implementations§
Source§impl SendCallback for NoOpSendCallback
impl SendCallback for NoOpSendCallback
Source§fn on_pending(&self, _chat_id: &str, _msg: &Message)
fn on_pending(&self, _chat_id: &str, _msg: &Message)
Message created and added to STATE as pending.
Source§fn on_upload_progress(
&self,
_pending_id: &str,
_percentage: u8,
_bytes_sent: u64,
) -> Result<(), String>
fn on_upload_progress( &self, _pending_id: &str, _percentage: u8, _bytes_sent: u64, ) -> Result<(), String>
File upload progress. Return Err(“…”) to cancel the upload.
Source§fn on_upload_complete(
&self,
_chat_id: &str,
_pending_id: &str,
_attachment_id: &str,
_url: &str,
)
fn on_upload_complete( &self, _chat_id: &str, _pending_id: &str, _attachment_id: &str, _url: &str, )
Upload complete, attachment URL now available.
Source§fn on_sent(&self, _chat_id: &str, _old_id: &str, _msg: &Message)
fn on_sent(&self, _chat_id: &str, _old_id: &str, _msg: &Message)
Message successfully delivered to at least one relay.
old_id is the pending ID, msg has the real event ID.Source§fn on_failed(&self, _chat_id: &str, _old_id: &str, _msg: &Message)
fn on_failed(&self, _chat_id: &str, _old_id: &str, _msg: &Message)
Message delivery failed after all retry attempts.
Source§fn on_persist(&self, _chat_id: &str, _msg: &Message)
fn on_persist(&self, _chat_id: &str, _msg: &Message)
Persist message to database. Default is no-op.
Tauri implements this to call save_message + save_slim_chat.
Auto Trait Implementations§
impl Freeze for NoOpSendCallback
impl RefUnwindSafe for NoOpSendCallback
impl Send for NoOpSendCallback
impl Sync for NoOpSendCallback
impl Unpin for NoOpSendCallback
impl UnsafeUnpin for NoOpSendCallback
impl UnwindSafe for NoOpSendCallback
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> 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