Struct Handler
pub struct Handler { /* private fields */ }Expand description
The worker side of an invocation, for any HTTP framework: give it the
request’s fusee-signature header and body, answer with its Reply.
Each call opens a fresh engine and closes it before it returns; nothing
is kept between invocations.
Implementations§
§impl Handler
impl Handler
pub fn new(
address: impl Into<String>,
secret: impl AsRef<[u8]>,
register: impl Fn(&Engine) + Send + Sync + 'static,
) -> Result<Self>
pub fn new( address: impl Into<String>, secret: impl AsRef<[u8]>, register: impl Fn(&Engine) + Send + Sync + 'static, ) -> Result<Self>
address: the server, with this worker’s connection options
(host:port?ca=...&token-file=...). secret: the endpoint’s signing
secret. register: registers the workflows on each fresh engine.
pub fn unsigned(
address: impl Into<String>,
register: impl Fn(&Engine) + Send + Sync + 'static,
) -> Self
pub fn unsigned( address: impl Into<String>, register: impl Fn(&Engine) + Send + Sync + 'static, ) -> Self
Accepts unsigned requests: only behind mutual TLS (serve with a
CA) or on a network only the server reaches.
pub fn configure(self, f: impl Fn(&mut Config) + Send + Sync + 'static) -> Self
pub fn configure(self, f: impl Fn(&mut Config) + Send + Sync + 'static) -> Self
Adjusts each engine’s configuration before it opens.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Handler
impl !UnwindSafe for Handler
impl Forget for Handler
impl Freeze for Handler
impl Move for Handler
impl Send for Handler
impl Sync for Handler
impl Unpin for Handler
impl UnsafeUnpin for Handler
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