Make server operation input and output wrappers `pub(crate)` (#1253)

These types are internal details users should not have access to.
This commit is contained in:
david-perez 2022-03-17 12:19:36 -07:00 committed by GitHub
parent 3eaddcf738
commit adc2ac08e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -157,7 +157,7 @@ private class ServerHttpProtocolImplGenerator(
rustTemplate(
"""
##[derive(Debug)]
pub struct $inputName(pub #{I});
pub(crate) struct $inputName(#{I});
##[#{AsyncTrait}::async_trait]
impl<B> #{AxumCore}::extract::FromRequest<B> for $inputName
where
@ -225,7 +225,7 @@ private class ServerHttpProtocolImplGenerator(
rustTemplate(
"""
pub enum $outputName {
pub(crate) enum $outputName {
Output(#{O}),
Error(#{E})
}
@ -260,7 +260,7 @@ private class ServerHttpProtocolImplGenerator(
rustTemplate(
"""
pub struct $outputName(pub #{O});
pub(crate) struct $outputName(#{O});
##[#{AsyncTrait}::async_trait]
impl #{AxumCore}::response::IntoResponse for $outputName {
fn into_response(self) -> #{AxumCore}::response::Response {