neon_arch commited on
Commit
cb1edad
1 Parent(s): 3481ec4

fixing documentation test in lib.rs and adding library documentation

Browse files
Files changed (1) hide show
  1. src/lib.rs +6 -3
src/lib.rs CHANGED
@@ -1,3 +1,6 @@
 
 
 
1
  pub mod engines;
2
  pub mod server;
3
  pub mod search_results_handler;
@@ -23,12 +26,12 @@ use handlebars::Handlebars;
23
  ///
24
  /// # Example
25
  ///
26
- /// ```
27
  /// use std::net::TcpListener;
28
- /// use web_server::Server;
29
  ///
30
  /// let listener = TcpListener::bind("127.0.0.1:8080").expect("Failed to bind address");
31
- /// let server = Server::run(listener).expect("Failed to start server");
32
  /// ```
33
  pub fn run(listener: TcpListener) -> std::io::Result<Server> {
34
  let mut handlebars: Handlebars = Handlebars::new();
 
1
+ //! This main library module provides the functionality to provide and handle the Tcp server
2
+ //! and register all the routes for the `websurfx` meta search engine website.
3
+
4
  pub mod engines;
5
  pub mod server;
6
  pub mod search_results_handler;
 
26
  ///
27
  /// # Example
28
  ///
29
+ /// ```rust
30
  /// use std::net::TcpListener;
31
+ /// use websurfx::run;
32
  ///
33
  /// let listener = TcpListener::bind("127.0.0.1:8080").expect("Failed to bind address");
34
+ /// let server = run(listener).expect("Failed to start server");
35
  /// ```
36
  pub fn run(listener: TcpListener) -> std::io::Result<Server> {
37
  let mut handlebars: Handlebars = Handlebars::new();