pub struct HttpTransportServer { /* private fields */ }Expand description
Unidirectional HTTP transport server used for request-response type of communication by clients for which a full libp2p transport is impossible.
Since it doesn’t run a full fledge transport, authentication is achieved
through a generated AuthToken signed by the public key of a node of the
cell.
At the moment, this transport is only used for entity queries and mutations.
Implementations§
Source§impl HttpTransportServer
impl HttpTransportServer
Sourcepub fn new(
local_node: LocalNode,
config: HttpTransportConfig,
clock: Clock,
) -> HttpTransportServer
pub fn new( local_node: LocalNode, config: HttpTransportConfig, clock: Clock, ) -> HttpTransportServer
Creates a new HTTP server with the given configuration and clock.
Sourcepub fn get_handle(
&mut self,
cell: Cell,
service_type: ServiceType,
) -> Result<HttpTransportServiceHandle, Error>
pub fn get_handle( &mut self, cell: Cell, service_type: ServiceType, ) -> Result<HttpTransportServiceHandle, Error>
Get a transport handle that will be used by services. This handle can only be used to receive messages and reply to them.
Auto Trait Implementations§
impl Freeze for HttpTransportServer
impl !RefUnwindSafe for HttpTransportServer
impl Send for HttpTransportServer
impl Sync for HttpTransportServer
impl Unpin for HttpTransportServer
impl !UnwindSafe for HttpTransportServer
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