Skip to main content

RequestExecutor

Trait RequestExecutor 

Source
pub trait RequestExecutor {
    // Required method
    fn execute(&mut self, req: Request) -> Result<Vec<u8>>;
}
Expand description

Something that can perform a HAP Request and return the response body.

M7 implements this over a SecureSession; tests implement it in memory.

Required Methods§

Source

fn execute(&mut self, req: Request) -> Result<Vec<u8>>

Perform req, returning the raw response body bytes.

§Errors

Implementations return a crate::ModelError::Executor (or map their own transport error into one) on failure.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§