pub struct ExtensionRouteBuilder {
pub global: Option<Box<OpenApiRouter<State>>>,
pub api_admin: Option<Box<OpenApiRouter<State>>>,
pub api_auth: Option<Box<OpenApiRouter<State>>>,
pub api_client: Option<Box<OpenApiRouter<State>>>,
pub api_client_servers_server: Option<Box<OpenApiRouter<State>>>,
pub api_remote: Option<Box<OpenApiRouter<State>>>,
pub api_remote_servers_server: Option<Box<OpenApiRouter<State>>>,
/* private fields */
}Fields§
§global: Option<Box<OpenApiRouter<State>>>§api_admin: Option<Box<OpenApiRouter<State>>>§api_auth: Option<Box<OpenApiRouter<State>>>§api_client: Option<Box<OpenApiRouter<State>>>§api_client_servers_server: Option<Box<OpenApiRouter<State>>>§api_remote: Option<Box<OpenApiRouter<State>>>§api_remote_servers_server: Option<Box<OpenApiRouter<State>>>Implementations§
Source§impl ExtensionRouteBuilder
impl ExtensionRouteBuilder
pub fn new(state: State) -> Self
Sourcepub fn add_global_router(
self,
router: impl FnOnce(OpenApiRouter<State>) -> OpenApiRouter<State>,
) -> Self
pub fn add_global_router( self, router: impl FnOnce(OpenApiRouter<State>) -> OpenApiRouter<State>, ) -> Self
Adds a router for handling requests to /.
Sourcepub fn add_admin_api_router(
self,
router: impl FnOnce(OpenApiRouter<State>) -> OpenApiRouter<State>,
) -> Self
pub fn add_admin_api_router( self, router: impl FnOnce(OpenApiRouter<State>) -> OpenApiRouter<State>, ) -> Self
Adds a router for handling requests to /api/admin.
Authentication middleware is already handled by the parent router.
Sourcepub fn add_auth_api_router(
self,
router: impl FnOnce(OpenApiRouter<State>) -> OpenApiRouter<State>,
) -> Self
pub fn add_auth_api_router( self, router: impl FnOnce(OpenApiRouter<State>) -> OpenApiRouter<State>, ) -> Self
Adds a router for handling requests to /api/auth.
Sourcepub fn add_client_api_router(
self,
router: impl FnOnce(OpenApiRouter<State>) -> OpenApiRouter<State>,
) -> Self
pub fn add_client_api_router( self, router: impl FnOnce(OpenApiRouter<State>) -> OpenApiRouter<State>, ) -> Self
Adds a router for handling requests to /api/client.
Authentication middleware is already handled by the parent router.
Sourcepub fn add_client_server_api_router(
self,
router: impl FnOnce(OpenApiRouter<State>) -> OpenApiRouter<State>,
) -> Self
pub fn add_client_server_api_router( self, router: impl FnOnce(OpenApiRouter<State>) -> OpenApiRouter<State>, ) -> Self
Adds a router for handling requests to /api/client/servers/{server}.
Authentication middleware is already handled by the parent router.
Sourcepub fn add_remote_api_router(
self,
router: impl FnOnce(OpenApiRouter<State>) -> OpenApiRouter<State>,
) -> Self
pub fn add_remote_api_router( self, router: impl FnOnce(OpenApiRouter<State>) -> OpenApiRouter<State>, ) -> Self
Adds a router for handling requests to /api/remote.
Authentication middleware is already handled by the parent router.
Sourcepub fn add_remote_server_api_router(
self,
router: impl FnOnce(OpenApiRouter<State>) -> OpenApiRouter<State>,
) -> Self
pub fn add_remote_server_api_router( self, router: impl FnOnce(OpenApiRouter<State>) -> OpenApiRouter<State>, ) -> Self
Adds a router for handling requests to /api/admin.
Authentication middleware is already handled by the parent router.
Auto Trait Implementations§
impl Freeze for ExtensionRouteBuilder
impl !RefUnwindSafe for ExtensionRouteBuilder
impl Send for ExtensionRouteBuilder
impl Sync for ExtensionRouteBuilder
impl Unpin for ExtensionRouteBuilder
impl !UnwindSafe for ExtensionRouteBuilder
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Chain<T> for T
impl<T> Chain<T> for T
§impl<T> Classify for T
impl<T> Classify for T
type Classified = T
fn classify(self) -> T
§impl<T> Declassify for T
impl<T> Declassify for T
type Declassified = T
fn declassify(self) -> T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more