Struct product_os_server::ProductOSServer
source · pub struct ProductOSServer { /* private fields */ }Implementations§
source§impl ProductOSServer
impl ProductOSServer
pub fn new_with_config_sync(config: Configuration) -> Self
pub async fn new_with_config(config: Configuration) -> Self
pub fn new() -> Self
pub fn set_logging(&mut self, log_level: Level)
pub fn set_certificate(&mut self, certificate: Option<Certificate>)
pub fn set_security(&mut self, security: Option<Security>)
pub fn get_router(&mut self) -> &mut ProductOSRouter
pub fn add_route(&mut self, path: &str, service_handler: MethodRouter)
pub fn set_fallback(&mut self, service_handler: MethodRouter)
pub fn add_get<H, T>(&mut self, path: &str, handler: H)where H: Handler<T, (), Body>, T: 'static,
pub fn add_post<H, T>(&mut self, path: &str, handler: H)where H: Handler<T, (), Body>, T: 'static,
pub fn add_handler<H, T>(&mut self, path: &str, method: Method, handler: H)where H: Handler<T, (), Body>, T: 'static,
pub fn set_fallback_handler<H, T>(&mut self, handler: H)where H: Handler<T, (), Body>, T: 'static,
pub fn add_handlers<H, T>(&mut self, path: &str, handlers: HashMap<Method, H>)where H: Handler<T, (), Body>, T: 'static,
pub fn add_middleware<L, NewResBody>(&mut self, middleware: L)where L: Layer<Route<Body>> + Clone + Send + 'static, L::Service: Service<Request<Body>, Response = Response<NewResBody>, Error = Infallible> + Clone + Send + 'static, <L::Service as Service<Request<Body>>>::Future: Send + 'static, NewResBody: HttpBody<Data = Bytes> + Send + 'static, NewResBody::Error: Into<BoxError>,
pub fn set_router(&mut self, router: ProductOSRouter)
pub async fn create_dual_service_server( &mut self, serve_on_main_thread: bool, custom_port: Option<u16>, custom_router: Option<Router>, with_connect_info: bool, force_secure: bool ) -> Result<(), Box<dyn Error + Send + Sync>>
pub async fn create_https_server( &mut self, serve_on_main_thread: bool, custom_port: Option<u16>, custom_router: Option<Router>, with_connect_info: bool ) -> Result<(), Box<dyn Error + Send + Sync>>
pub async fn create_http_server( &mut self, serve_on_main_thread: bool, custom_port: Option<u16>, custom_router: Option<Router>, with_connect_info: bool ) -> Result<(), Box<dyn Error + Send + Sync>>
pub async fn init_stores(&mut self)
pub fn get_config(&self) -> Configuration
pub fn update_config(&mut self, config: Configuration)
pub fn get_base_url(&self) -> Url
pub fn start_sync(&mut self) -> Result<Handle, Box<dyn Error + Send + Sync>>
pub async fn start(&mut self) -> Result<Handle, Box<dyn Error + Send + Sync>>
Auto Trait Implementations§
impl !RefUnwindSafe for ProductOSServer
impl Send for ProductOSServer
impl !Sync for ProductOSServer
impl Unpin for ProductOSServer
impl !UnwindSafe for ProductOSServer
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