pub struct HttpTransport { /* private fields */ }Expand description
HTTP transport implementation using axum and reqwest.
Implementations§
Source§impl HttpTransport
impl HttpTransport
Sourcepub const TRANSPORT_TYPE: &'static str = "http"
pub const TRANSPORT_TYPE: &'static str = "http"
Transport type identifier for HTTP
Sourcepub fn builder() -> HttpTransportBuilder
pub fn builder() -> HttpTransportBuilder
Create a builder for configuring the transport.
Trait Implementations§
Source§impl SyncTransport for HttpTransport
impl SyncTransport for HttpTransport
Source§fn transport_type(&self) -> &'static str
fn transport_type(&self) -> &'static str
Get the transport type identifier. Read more
Source§fn can_handle_address(&self, address: &Address) -> bool
fn can_handle_address(&self, address: &Address) -> bool
Check if this transport can handle the given address Read more
Source§fn start_server<'life0, 'async_trait>(
&'life0 mut self,
handler: Arc<dyn SyncHandler>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn start_server<'life0, 'async_trait>(
&'life0 mut self,
handler: Arc<dyn SyncHandler>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Start a server with the pre-configured bind address. Read more
Source§fn stop_server<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn stop_server<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Stop the running server gracefully. Read more
Source§fn send_request<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
address: &'life1 Address,
request: &'life2 SyncRequest,
) -> Pin<Box<dyn Future<Output = Result<SyncResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn send_request<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
address: &'life1 Address,
request: &'life2 SyncRequest,
) -> Pin<Box<dyn Future<Output = Result<SyncResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Send a sync request to a peer and receive a response. Read more
Source§fn is_server_running(&self) -> bool
fn is_server_running(&self) -> bool
Check if the server is currently running. Read more
Source§fn get_server_address(&self) -> Result<String>
fn get_server_address(&self) -> Result<String>
Get the address the server is currently bound to. Read more
Source§fn send_entries<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
address: &'life1 Address,
entries: &'life2 [Entry],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn send_entries<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
address: &'life1 Address,
entries: &'life2 [Entry],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Send entries to a sync peer and ensure they are acknowledged. Read more
Auto Trait Implementations§
impl Freeze for HttpTransport
impl !RefUnwindSafe for HttpTransport
impl Send for HttpTransport
impl Sync for HttpTransport
impl Unpin for HttpTransport
impl !UnwindSafe for HttpTransport
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
§impl<T> CompatExt for T
impl<T> CompatExt for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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