Skip to content

Commit

Permalink
Make server operation input and output wrappers pub(crate) (#1253)
Browse files Browse the repository at this point in the history
These types are internal details users should not have access to.
  • Loading branch information
david-perez authored Mar 17, 2022
1 parent 3eaddcf commit adc2ac0
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -225,7 +225,7 @@ private class ServerHttpProtocolImplGenerator(

rustTemplate(
"""
pub enum $outputName {
pub(crate) enum $outputName {
Output(#{O}),
Error(#{E})
}
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit adc2ac0

Please sign in to comment.