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

Documentation updates for return types #893

Merged
merged 52 commits into from Oct 28, 2023
Merged

Conversation

AliSajid
Copy link
Contributor

@AliSajid AliSajid commented May 9, 2023

Description of change

I have added return types docs for several services. This is in relation to pull request #891.

@oddgrd oddgrd added B-Shuttle Batch Submitted by a Shuttle Batch participant B-S A small task that is a good place to start for new contributors A-docs labels May 14, 2023
Copy link
Contributor

@iulianbarbu iulianbarbu left a comment

Choose a reason for hiding this comment

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

Hey @AliSajid ! Thanks a lot for starting this. At high level, the approach is good, but I would stick with the public docs code snippets (or close to them, I like the todo()! approach).

On another note, can you document the persist Shuttle resource as well? You can find more about it here: https://docs.shuttle.rs/resources/shuttle-persist. You can include it in this PR or please coordinate with your team partner, maybe you think it's better to include it here: #892.

service/src/error.rs Outdated Show resolved Hide resolved
Comment on lines 49 to 53
/// #[shuttle_runtime::main]
/// async example_service() ->
/// ShuttleAxum<impl FnOnce(&mut ServiceConfig) + Send + Clone + 'static> {
/// todo!()
/// }
Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm, I don't think this looks like in the public docs: https://docs.shuttle.rs/examples/axum. Can we change it to be similar?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will update them all with these.

Comment on lines 54 to 57
/// async example_service() ->
/// ShuttlePoem<impl FnOnce(&mut ServiceConfig) + Send + Clone + 'static> {
/// todo!()
/// }
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto. Please refer to: https://docs.shuttle.rs/examples/other.

Comment on lines 81 to 84
/// async example_service() ->
/// ShuttlePoise<impl FnOnce(&mut ServiceConfig) + Send + Clone + 'static> {
/// todo!()
/// }
Copy link
Contributor

Choose a reason for hiding this comment

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

Comment on lines 68 to 71
/// async example_service() ->
/// ShuttleRocket<impl FnOnce(&mut rocket::config::Config) + Send + Clone + 'static> {
/// todo!()
/// }
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto. Please refer to: https://docs.shuttle.rs/examples/other.

Comment on lines 51 to 54
/// async example_service() ->
/// ShuttleSalvo<impl FnOnce(&mut ServiceConfig) + Send + Clone + 'static> {
/// todo!()
/// }
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto. Please refer to: https://docs.shuttle.rs/examples/other.

Comment on lines 58 to 61
/// async fn example_service() ->
/// ShuttleThruster<impl FnOnce(&mut ServiceConfig) + Send + Clone + 'static> {
/// todo!()
/// }
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto. Please refer to: https://docs.shuttle.rs/examples/other.

Comment on lines 57 to 60
/// async fn example_service() ->
/// ShuttleWarp<impl FnOnce(&mut ServiceConfig) + Send + Clone + 'static> {
/// todo!()
/// }
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto. Please refer to: https://docs.shuttle.rs/examples/other.

@iulianbarbu
Copy link
Contributor

Hey @AliSajid ! How's the work going, do you need help with anything?

@AliSajid
Copy link
Contributor Author

Hey @AliSajid ! How's the work going, do you need help with anything?

Hi @iulianbarbu . I have warp and poise left to fix. Otherwise the tests pass and the format check also passes. I think these should be good to go.

@AliSajid AliSajid marked this pull request as ready for review May 28, 2023 05:15
Co-authored-by: Iulian Barbu <14218860+iulianbarbu@users.noreply.github.com>
Copy link
Contributor

@oddgrd oddgrd left a comment

Choose a reason for hiding this comment

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

This looks great to me, thanks so much @AliSajid! Just one small comment about using "/" rather than "/hello" for the hello-world endpoint. We should also do this in the other example in the services crates.

services/shuttle-axum/src/lib.rs Outdated Show resolved Hide resolved
@jonaro00 jonaro00 removed A-docs B-S A small task that is a good place to start for new contributors B-Shuttle Batch Submitted by a Shuttle Batch participant labels Aug 17, 2023
@jonaro00 jonaro00 merged commit b98ae53 into shuttle-hq:main Oct 28, 2023
34 checks passed
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

4 participants