pub struct Application { /* fields omitted */ }
Could in the future support multiple transport layers and application layers.
use milstian_internet_framework::{Application, Config};
let config = Config::from_env().expect("Failed to get configuration from environment");
Application::new(config).tcp_http_with_legacy_responders();
Create a new TCP HTTP application
extern crate milstian_internet_framework;
use milstian_internet_framework::{Application, Config};
use milstian_internet_framework::response::tcp::http::{error, file_not_found, filesystem, ResponderInterface};
fn main() {
let responders: Vec<Box<ResponderInterface + Send>> = vec![
Box::new(filesystem::Responder::new()),
Box::new(error::Responder::new()),
];
let config = Config::from_env().expect("Failed to get configuration from environment");
Application::new(config).tcp_http(responders);
}
Create a new TCP HTTP application with the legacy responders
extern crate milstian_internet_framework;
use milstian_internet_framework::{Application, Config};
fn main() {
let config = Config::from_env().expect("Failed to get configuration from environment");
Application::new(config).tcp_http_with_legacy_responders();
}
use milstian_internet_framework::{Application, Config};
fn main() {
let config = Config::from_env().expect("Failed to get configuration from environment");
Application::new(config).tcp_http_with_legacy_responders();
}
Performs copy-assignment from source
. Read more
Formats the value using the given formatter. Read more