Skip to content
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 accessors to Connected fields #2290

Merged
merged 2 commits into from
Sep 30, 2020

Conversation

sfackler
Copy link
Contributor

These are useful when unit testing connector layers that do things like handling proxies, so you don't need to spin up an entire HTTP request to see if the returned connection state is correct or not. Ideally we'd expose an accessor for the extra info as well, but that's not currently in a form that's easy to work with.

@sfackler
Copy link
Contributor Author

I think the way to expose the extras would just be

pub fn get_extras(&self, extensions: &mut Extensions) { ... }

A bit weird, but it's really the only way you'd be able to interact with it anyway.

Copy link
Member

@seanmonstar seanmonstar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@seanmonstar seanmonstar merged commit 2dc9768 into hyperium:master Sep 30, 2020
BenxiangGe pushed a commit to BenxiangGe/hyper that referenced this pull request Jul 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants