pub struct HttpPlainMessageSenderWithTracking { /* private fields */ }
Expand description
HTTP message sender with delivery tracking
This sender extends HttpPlainMessageSender with delivery tracking capabilities, recording delivery attempts, success/failure status, HTTP status codes, and retry counts in the database for monitoring and automatic retry processing.
§Features
- All capabilities of HttpPlainMessageSender
- Delivery record creation before sending
- Status updates after delivery attempts
- Retry count tracking
- HTTP status code recording
- Error message logging
§Usage
// Create storage instance
let storage = Arc::new(Storage::new(None).await?);
// Create sender with tracking
let sender = HttpPlainMessageSenderWithTracking::new(
"https://recipient.example.com".to_string(),
storage
);
// Send message - delivery will be tracked automatically
sender.send("packed_message".to_string(), vec!["did:example:recipient".to_string()]).await?;
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for HttpPlainMessageSenderWithTracking
impl !RefUnwindSafe for HttpPlainMessageSenderWithTracking
impl Send for HttpPlainMessageSenderWithTracking
impl Sync for HttpPlainMessageSenderWithTracking
impl Unpin for HttpPlainMessageSenderWithTracking
impl !UnwindSafe for HttpPlainMessageSenderWithTracking
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