pub struct ClientHost { /* private fields */ }Expand description
Protocol handler for cloud-to-endpoint connections.
Implementations§
Source§impl ClientHost
impl ClientHost
pub fn new(endpoint: &Endpoint) -> Self
Sourcepub fn with_log_collector(self, collector: LogCollector) -> Self
pub fn with_log_collector(self, collector: LogCollector) -> Self
Enables the cloud to set the log level filter at runtime via the
SetLogLevel callback.
Without a collector the handler still accepts the message but responds
with RemoteError::AuthError indicating the feature is disabled.
Trait Implementations§
Source§impl Clone for ClientHost
impl Clone for ClientHost
Source§fn clone(&self) -> ClientHost
fn clone(&self) -> ClientHost
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ClientHost
impl Debug for ClientHost
Source§impl ProtocolHandler for ClientHost
impl ProtocolHandler for ClientHost
Source§async fn accept(&self, connection: Connection) -> Result<(), AcceptError>
async fn accept(&self, connection: Connection) -> Result<(), AcceptError>
Handle an incoming connection. Read more
Auto Trait Implementations§
impl Freeze for ClientHost
impl !RefUnwindSafe for ClientHost
impl Send for ClientHost
impl Sync for ClientHost
impl Unpin for ClientHost
impl !UnwindSafe for ClientHost
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<P> DynProtocolHandler for Pwhere
P: ProtocolHandler,
impl<P> DynProtocolHandler for Pwhere
P: ProtocolHandler,
§fn accept(
&self,
connection: Connection,
) -> Pin<Box<dyn Future<Output = Result<(), AcceptError>> + Send + '_>>
fn accept( &self, connection: Connection, ) -> Pin<Box<dyn Future<Output = Result<(), AcceptError>> + Send + '_>>
See [
ProtocolHandler::accept].§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