pub trait HookChannel: MaybeSend + MaybeSync {
// Required methods
fn audience(&self) -> Option<&str>;
fn call(
&self,
request: HookRequest,
) -> impl Future<Output = Result<HookResponse, ChannelError>> + MaybeSend;
// Provided method
fn isolated(&self) -> bool { ... }
}Expand description
A route to one hook service.
Required Methods§
Sourcefn audience(&self) -> Option<&str>
fn audience(&self) -> Option<&str>
The hook endpoint’s canonical origin, the <audience> a signature
binds (SPEC-SERVER §7.1). None for a channel with no origin, which is
then only usable unsigned and isolated. Plain http:// is accepted
only for a loopback host (§6.1); any other channel must use TLS with
certificate verification and must not follow redirects.
Sourcefn call(
&self,
request: HookRequest,
) -> impl Future<Output = Result<HookResponse, ChannelError>> + MaybeSend
fn call( &self, request: HookRequest, ) -> impl Future<Output = Result<HookResponse, ChannelError>> + MaybeSend
Send request and return the hook’s response.
§Errors
ChannelError when there is no response to return.
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".