diff --git a/tonic/src/service/router.rs b/tonic/src/service/router.rs index 70dc19136..14b5125c7 100644 --- a/tonic/src/service/router.rs +++ b/tonic/src/service/router.rs @@ -116,6 +116,22 @@ impl Routes { } } +impl From for RoutesBuilder { + fn from(routes: Routes) -> Self { + Self { + routes: Some(routes), + } + } +} + +impl From for RoutesBuilder { + fn from(router: axum::Router) -> Self { + Self { + routes: Some(router.into()), + } + } +} + impl From for Routes { fn from(router: axum::Router) -> Self { Self { router }