pub struct HttpPlainMessageSender { /* private fields */ }Expand description
HTTP message sender implementation for sending messages over HTTP
This sender allows TAP nodes to send messages to other TAP nodes over HTTP, handling the necessary encoding, content types, and error handling.
§HTTP Endpoint Structure
PlainMessages are sent to endpoints derived from the recipient’s DID, using a configurable base URL.
§Error Handling
The sender includes built-in error handling for common HTTP issues:
- Connection timeouts
- Request failures
- Invalid responses
- Rate limiting
§Configuration
The sender can be configured with:
- Base URL for the HTTP endpoint
- Timeout settings
- Retry policies
Implementations§
Source§impl HttpPlainMessageSender
impl HttpPlainMessageSender
Sourcepub fn new(base_url: String) -> Self
pub fn new(base_url: String) -> Self
Create a new HttpPlainMessageSender with the given base URL
Sourcepub fn with_options(base_url: String, timeout_ms: u64, max_retries: u32) -> Self
pub fn with_options(base_url: String, timeout_ms: u64, max_retries: u32) -> Self
Create a new HttpPlainMessageSender with custom options
Sourcepub fn get_endpoint_url(&self, recipient_did: &str) -> String
pub fn get_endpoint_url(&self, recipient_did: &str) -> String
Helper to construct the endpoint URL for a recipient
Trait Implementations§
Source§impl Debug for HttpPlainMessageSender
impl Debug for HttpPlainMessageSender
Auto Trait Implementations§
impl Freeze for HttpPlainMessageSender
impl !RefUnwindSafe for HttpPlainMessageSender
impl Send for HttpPlainMessageSender
impl Sync for HttpPlainMessageSender
impl Unpin for HttpPlainMessageSender
impl UnsafeUnpin for HttpPlainMessageSender
impl !UnwindSafe for HttpPlainMessageSender
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