We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Example to reproduce:
#[derive(Debug)] pub struct Request<T> { inner: http::Request<T>, } #[buildstructor::builder] impl<T> Request<T> { pub fn fake_new<K, V>( headers: Vec<(K, V)>, uri: Option<http::Uri>, method: Option<http::Method>, body: T, ) -> http::Result<Request<T>> where HeaderName: TryFrom<K>, <HeaderName as TryFrom<K>>::Error: Into<http::Error>, HeaderValue: TryFrom<V>, <HeaderValue as TryFrom<V>>::Error: Into<http::Error>, { let mut builder = http::request::Builder::new().method(method).uri(uri); for (key, value) in headers { builder = builder.header(key, value); } let req = builder.body(body)?; Ok(Self { inner: req }) } } // Use it Request::builder() .header(("da".to_string(), "vda".to_string())) .header(("db".to_string(), "vdb".to_string())) .header(("db".to_string(), "vdb".to_string())) .header((HOST.to_string(), "host".to_string())) .header((CONTENT_LENGTH.to_string(), "2".to_string())) .header((CONTENT_TYPE.to_string(), "graphql".to_string())) .body(Request::builder().query("query").build()) .build() // ERROR: Cannot find build .unwrap(),
The text was updated successfully, but these errors were encountered:
Ordering of generics bug that was causing issue with complex generic …
7eaa450
…types Fixes #14
334a474
7711973
…types (#16) Fixes #14
@bnjjj Thanks for this. This was pretty tricky to figure out! Fixed in 0.1.6 release
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Example to reproduce:
The text was updated successfully, but these errors were encountered: