[−][src]Struct ctchi::core::app::Ctchi
Implementations
impl Ctchi
[src]
pub fn new(routes: Routes) -> Ctchi
[src]
Create new application with specified configuration.
Arguments:
config
- configuration for application.ctchi::core::ctchi::Config
pub fn start(self) -> Result<()>
[src]
Start configured application. Now it will lister for specified ip:port and respond for request if URI is in routes
Examples:
ⓘThis example is not tested
use ctchi::core::ctchi::{Config, Ctchi}; use ctchi::core::routes::Routes; let mut routes = Routes::new(); routes.add_route("/", "/src/pages.static/index.html"); let configuration = Config { bind_path: "127.0.0.1:8080", base_path: "/var/www/", routes, }; let server = Ctchi::new(configuration); server.start();
Auto Trait Implementations
impl RefUnwindSafe for Ctchi
impl Send for Ctchi
impl Sync for Ctchi
impl Unpin for Ctchi
impl UnwindSafe for Ctchi
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,