-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for custom request and response labels #25
Comments
So the way to do this is to define a new trait on which you have a const, call it pub trait InfoStr {
const BASE: &'static str;
}
pub struct Bhttp();
impl InfoStr for Bhttp {
const BASE: &'static str = "message/bhttp"
} Then you make all of the implementation pieces generic over The usage turns from Caveat: I haven't tested any of this by writing it. If you want to give it a spin, I am happy to review. Otherwise, I'll probably try this out at some later time. |
Thanks @martinthomson. This sounds like a reasonable approach to me. If I get some time, I'll give it a shot. |
* Change to new KMS endpoitn Error handling modified: Makefile modified: bhttp/Cargo.toml modified: bhttp/src/err.rs modified: bhttp/src/lib.rs modified: bhttp/src/rw.rs modified: ohttp-client/src/main.rs modified: ohttp-server/src/main.rs modified: ohttp/src/config.rs modified: ohttp/src/err.rs modified: ohttp/src/lib.rs modified: ohttp/src/nss/aead.rs modified: ohttp/src/nss/hpke.rs modified: ohttp/src/nss/p11.rs Address PR comments remove key logging Add backtrace Make more changes * format changes modified: bhttp/Cargo.toml modified: bhttp/src/err.rs modified: bhttp/src/lib.rs modified: bhttp/src/rw.rs modified: ohttp/Cargo.toml modified: ohttp/src/config.rs modified: ohttp/src/err.rs modified: ohttp/src/lib.rs modified: ohttp/src/nss/aead.rs modified: ohttp/src/nss/hpke.rs modified: ohttp/src/nss/p11.rs
For folks that want to reuse the encapsulation format it would be useful to be able to compile this crate with custom request and response labels. Right now, the crate mandates BHTTP as the underlying content. As a proof-of-concept, I implemented a protobuf-based encoding for HTTP messages and plumbed it into this crate in this change. It's not great... I basically want the equivalent of compile-time strings, but I don't know the best way to do that in Rust.
The text was updated successfully, but these errors were encountered: