-
Notifications
You must be signed in to change notification settings - Fork 258
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
Conversation
There was a problem hiding this 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.
services/shuttle-axum/src/lib.rs
Outdated
/// #[shuttle_runtime::main] | ||
/// async example_service() -> | ||
/// ShuttleAxum<impl FnOnce(&mut ServiceConfig) + Send + Clone + 'static> { | ||
/// todo!() | ||
/// } |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
services/shuttle-poem/src/lib.rs
Outdated
/// async example_service() -> | ||
/// ShuttlePoem<impl FnOnce(&mut ServiceConfig) + Send + Clone + 'static> { | ||
/// todo!() | ||
/// } |
There was a problem hiding this comment.
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.
services/shuttle-poise/src/lib.rs
Outdated
/// async example_service() -> | ||
/// ShuttlePoise<impl FnOnce(&mut ServiceConfig) + Send + Clone + 'static> { | ||
/// todo!() | ||
/// } |
There was a problem hiding this comment.
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://github.com/shuttle-hq/shuttle-examples/blob/main/poise/hello-world/src/main.rs#L18.
services/shuttle-rocket/src/lib.rs
Outdated
/// async example_service() -> | ||
/// ShuttleRocket<impl FnOnce(&mut rocket::config::Config) + Send + Clone + 'static> { | ||
/// todo!() | ||
/// } |
There was a problem hiding this comment.
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.
services/shuttle-salvo/src/lib.rs
Outdated
/// async example_service() -> | ||
/// ShuttleSalvo<impl FnOnce(&mut ServiceConfig) + Send + Clone + 'static> { | ||
/// todo!() | ||
/// } |
There was a problem hiding this comment.
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.
services/shuttle-thruster/src/lib.rs
Outdated
/// async fn example_service() -> | ||
/// ShuttleThruster<impl FnOnce(&mut ServiceConfig) + Send + Clone + 'static> { | ||
/// todo!() | ||
/// } |
There was a problem hiding this comment.
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.
services/shuttle-warp/src/lib.rs
Outdated
/// async fn example_service() -> | ||
/// ShuttleWarp<impl FnOnce(&mut ServiceConfig) + Send + Clone + 'static> { | ||
/// todo!() | ||
/// } |
There was a problem hiding this comment.
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.
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. |
Co-authored-by: Iulian Barbu <14218860+iulianbarbu@users.noreply.github.com>
There was a problem hiding this 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.
Description of change
I have added return types docs for several services. This is in relation to pull request #891.