Skip to main content

HookChannel

Trait HookChannel 

Source
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§

Source

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.

Source

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§

Source

fn isolated(&self) -> bool

Whether this is a platform service binding unreachable from the public internet, the only channel that may skip signing (SPEC-SERVER §7.3).

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§