pub struct GatewayBuilder {
pub gateway_name: Arc<str>,
pub http_routers: HashMap<String, HttpRoute>,
pub http_plugins: Vec<BoxLayer>,
pub http_fallback: ArcHyperService,
pub http_route_reloader: Reloader<HttpRouterService>,
pub extensions: Extensions,
pub x_request_id: bool,
}Fields§
§gateway_name: Arc<str>§http_routers: HashMap<String, HttpRoute>§http_plugins: Vec<BoxLayer>§http_fallback: ArcHyperService§http_route_reloader: Reloader<HttpRouterService>§extensions: Extensions§x_request_id: boolImplementations§
Source§impl GatewayBuilder
impl GatewayBuilder
pub fn new(gateway_name: impl Into<Arc<str>>) -> Self
pub fn x_request_id(self, enable: bool) -> Self
pub fn http_router(self, route: HttpRoute) -> Self
pub fn http_routers( self, routes: impl IntoIterator<Item = (String, HttpRoute)>, ) -> Self
pub fn http_plugin(self, plugin: BoxLayer) -> Self
pub fn http_plugins(self, plugins: impl IntoIterator<Item = BoxLayer>) -> Self
pub fn http_fallback(self, fallback: ArcHyperService) -> Self
pub fn http_route_reloader(self, reloader: Reloader<HttpRouterService>) -> Self
pub fn ext(self, extension: Extensions) -> Self
pub fn build(self) -> Gateway
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GatewayBuilder
impl !RefUnwindSafe for GatewayBuilder
impl Send for GatewayBuilder
impl Sync for GatewayBuilder
impl Unpin for GatewayBuilder
impl !UnwindSafe for GatewayBuilder
Blanket Implementations§
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