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 / fix smithy-client docs #855

Merged
merged 12 commits into from
Nov 19, 2021
Merged

Add / fix smithy-client docs #855

merged 12 commits into from
Nov 19, 2021

Conversation

rcoh
Copy link
Collaborator

@rcoh rcoh commented Nov 11, 2021

Motivation and Context

Improve docs for constructing smithy clients

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@rcoh rcoh requested a review from a team as a code owner November 11, 2021 19:09
@github-actions
Copy link

A new generated diff is ready to view: __generated-main...__generated-docs-fix

Copy link

@paholg paholg left a comment

Choose a reason for hiding this comment

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

Thanks, this would have helped me!

@@ -122,6 +122,24 @@ fn find_source<'a, E: Error + 'static>(err: &'a (dyn Error + 'static)) -> Option

#[derive(Default, Debug)]
/// Builder for [`HyperAdapter`]
///
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should this doc comment go on HyperAdapter itself? At least when I was digging into the docs, that's where I landed first, and then made my way into the builder doc once I knew I wanted to use it and needed to construct it.

/// use aws_smithy_client::erase::DynConnector;
/// let hyper_connector = hyper_ext::Adapter::builder().build(conns::https());
/// // this client can then be used when constructing a Smithy Client
/// // NOTE: in real usage, you will almost certainly want a real middleware implementation
Copy link
Collaborator

Choose a reason for hiding this comment

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

What do you mean by this note?

Comment on lines 137 to 138
/// use aws_smithy_client::erase::DynConnector;
/// let hyper_connector = hyper_ext::Adapter::builder().build(conns::https());
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
/// use aws_smithy_client::erase::DynConnector;
/// let hyper_connector = hyper_ext::Adapter::builder().build(conns::https());
/// use aws_smithy_client::erase::DynConnector;
///
/// let hyper_connector = hyper_ext::Adapter::builder().build(conns::https());

@github-actions
Copy link

A new generated diff is ready to view: __generated-main...__generated-docs-fix

@rcoh rcoh requested a review from jdisanti November 12, 2021 18:45
rust-runtime/aws-smithy-client/src/hyper_ext.rs Outdated Show resolved Hide resolved
Comment on lines -30 to +65
pub struct HyperAdapter<C>(HttpReadTimeout<hyper::Client<ConnectTimeout<C>, SdkBody>>);
pub struct Adapter<C>(HttpReadTimeout<hyper::Client<ConnectTimeout<C>, SdkBody>>);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Isn't this a breaking change that should get called out?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

no, we were publicly exporting it as Adapter

@github-actions
Copy link

A new generated diff is ready to view: __generated-main...__generated-docs-fix

@github-actions
Copy link

A new generated diff is ready to view: __generated-main...__generated-docs-fix

@github-actions
Copy link

A new generated diff is ready to view: __generated-main...__generated-docs-fix

@rcoh rcoh enabled auto-merge (squash) November 19, 2021 20:26
@github-actions
Copy link

A new generated diff is ready to view: __generated-main...__generated-docs-fix

@rcoh rcoh merged commit cab7de3 into main Nov 19, 2021
@rcoh rcoh deleted the docs-fix branch November 19, 2021 20:41
@rcoh rcoh mentioned this pull request Dec 1, 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.

None yet

3 participants