Struct mini_server::SimpleServer
source · pub struct SimpleServer {
pub addr: &'static str,
pub port: u32,
/* private fields */
}
Fields§
§addr: &'static str
§port: u32
Implementations§
source§impl SimpleServer
impl SimpleServer
pub fn new(addr: &'static str, port: u32) -> Self
pub fn on_request(&mut self, handler: SimpleEventHandler)
pub fn set_buffer_to(&mut self, size: usize)
Trait Implementations§
source§impl Server<&mut TcpStream, Vec<u8>> for SimpleServer
impl Server<&mut TcpStream, Vec<u8>> for SimpleServer
fn handle_request(&mut self, stream: &mut TcpStream, req: Request)
fn run(&mut self)
fn on_ready(&mut self, handler: SoftEventHandler)
fn on_shutdown(&mut self, handler: SoftEventHandler)
Auto Trait Implementations§
impl RefUnwindSafe for SimpleServer
impl Send for SimpleServer
impl Sync for SimpleServer
impl Unpin for SimpleServer
impl UnwindSafe for SimpleServer
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