var searchIndex = {}; searchIndex["rouille"] = {"doc":"","items":[[3,"LogEntry","rouille","RAII guard that ensures that a log entry corresponding to a request will be written.",null,null],[3,"SessionsManager","","Manages all active user sessions in memory.",null,null],[3,"Session","","Represents an entry in the sessions manager.",null,null],[3,"Response","","Contains a prototype of a response.\nThe response is only sent when you call `Request::respond`.",null,null],[12,"status_code","","The status code to return to the user.",0,null],[12,"headers","","List of headers to be returned in the response.",0,null],[12,"data","","An opaque type that contains the body of the response.",0,null],[3,"ResponseBody","","An opaque type that represents the body of a response.",null,null],[3,"Request","","Represents a request that your handler must answer to.",null,null],[4,"RouteError","","An error that one of your routes can return.",null,null],[13,"NoRouteFound","","Couldn't find a way to handle this request.",1,null],[13,"WrongInput","","The user input is wrong.",1,null],[13,"LoginRequired","","The user must be logged in.",1,null],[13,"WrongLoginPassword","","The user entered a wrong login or password.",1,null],[13,"NotAuthorized","","The user is logged in but shouldn't be there.",1,null],[5,"match_assets","","Searches inside `path` for a file that matches the given request. If a file is found,\nreturns a `Response` that would serve this file if returned.",null,{"inputs":[{"name":"request"},{"name":"p"}],"output":{"name":"result"}}],[5,"generate_session_id","","Generates a string suitable for a session ID.",null,{"inputs":[],"output":{"name":"string"}}],[5,"start_server","","Starts a server and uses the given requests handler.",null,{"inputs":[{"name":"a"},{"name":"f"}],"output":null}],[0,"input","","",null,null],[3,"SessionsManager","rouille::input","Manages all active user sessions in memory.",null,null],[3,"Session","","Represents an entry in the sessions manager.",null,null],[3,"HttpAuthCredentials","","",null,null],[12,"login","","",2,null],[12,"password","","",2,null],[5,"generate_session_id","","Generates a string suitable for a session ID.",null,{"inputs":[],"output":{"name":"string"}}],[5,"get_basic_http_auth","","Attempts to parse a `Authorization` header with basic HTTP auth.",null,{"inputs":[{"name":"request"}],"output":{"name":"option"}}],[5,"get_cookies","","Attempts to parse the list of cookies from the request.",null,{"inputs":[{"name":"request"}],"output":{"name":"vec"}}],[0,"json","","",null,null],[4,"JsonError","rouille::input::json","Error that can happen when parsing the JSON input.",null,null],[13,"WrongContentType","","Wrong content type.",3,null],[13,"NotUtf8","","The request's body was not UTF8.",3,null],[13,"ParseError","","Error while parsing.",3,null],[5,"get_json_input","","",null,{"inputs":[{"name":"request"}],"output":{"name":"result"}}],[11,"fmt","","",3,null],[11,"from","","",3,{"inputs":[{"name":"fromutf8error"}],"output":{"name":"jsonerror"}}],[11,"from","","",3,{"inputs":[{"name":"decodererror"}],"output":{"name":"jsonerror"}}],[0,"post","rouille::input","",null,null],[4,"PostError","rouille::input::post","Error that can happen when decoding POST data.",null,null],[13,"WrongContentType","","The `Content-Type` header of the request indicates that it doesn't contain POST data.",4,null],[13,"MissingField","","A field is missing from the received data.",4,null],[13,"WrongDataTypeBool","","Failed to parse a `bool` field.",4,null],[13,"WrongDataTypeInt","","Failed to parse an integer field.",4,null],[13,"WrongDataTypeFloat","","Failed to parse a floating-point field.",4,null],[13,"NotUtf8","","Failed to parse a string field.",4,null],[5,"get_post_input","","Attempts to decode the `POST` data received by the request into a struct.",null,{"inputs":[{"name":"request"}],"output":{"name":"result"}}],[11,"fmt","","",4,null],[11,"clone","","",4,null],[11,"from","rouille","",1,{"inputs":[{"name":"posterror"}],"output":{"name":"routeerror"}}],[11,"from","rouille::input::post","",4,{"inputs":[{"name":"parseboolerror"}],"output":{"name":"posterror"}}],[11,"from","","",4,{"inputs":[{"name":"parseinterror"}],"output":{"name":"posterror"}}],[11,"from","","",4,{"inputs":[{"name":"parsefloaterror"}],"output":{"name":"posterror"}}],[11,"new","rouille","Initializes the sessions manager.",5,{"inputs":[{"name":"s"},{"name":"u64"}],"output":{"name":"sessionsmanager"}}],[11,"start","","Tries to load an existing session from the request, or creates one if there\nis no session yet.",5,null],[11,"get","","Load the session infos from the manager. Returns `None` if there is no data yet.",6,null],[11,"has_data","","Returns true if there is session data.",6,null],[11,"set","","Stores the session infos in the manager.",6,null],[11,"clear","","Removes the session infos from the manager.",6,null],[11,"apply","","Applies the session on the `Response`. If you don't do that, the session won't be\nmaintained on further connections.",6,null],[11,"eq","rouille::input","",2,null],[11,"ne","","",2,null],[11,"clone","","",2,null],[11,"fmt","","",2,null],[11,"start","rouille","Starts a `LogEntry`.",7,{"inputs":[{"name":"w"},{"name":"request"}],"output":{"name":"logentry"}}],[11,"drop","","",7,null],[11,"from_error","","UNSTABLE. Builds a default response to handle the given route error.",0,{"inputs":[{"name":"routeerror"}],"output":{"name":"response"}}],[11,"redirect","","Builds a `Response` that redirects the user to another URL.",0,{"inputs":[{"name":"str"}],"output":{"name":"response"}}],[11,"html","","Builds a `Response` that outputs HTML.",0,{"inputs":[{"name":"d"}],"output":{"name":"response"}}],[11,"text","","Builds a `Response` that outputs plain text.",0,{"inputs":[{"name":"s"}],"output":{"name":"response"}}],[11,"json","","Builds a `Response` that outputs JSON.",0,{"inputs":[{"name":"t"}],"output":{"name":"response"}}],[11,"basic_http_auth_login_required","","Builds a `Response` that returns a `401 Not Authorized` status\nand a `WWW-Authenticate` header.",0,{"inputs":[{"name":"str"}],"output":{"name":"response"}}],[11,"with_status_code","","Changes the status code of the response.",0,null],[11,"empty","","Builds a `ResponseBody` that doesn't return any data.",8,{"inputs":[],"output":{"name":"responsebody"}}],[11,"from_reader","","Builds a new `ResponseBody` that will read the data from a `Read`.",8,{"inputs":[{"name":"r"}],"output":{"name":"responsebody"}}],[11,"from_data","","Builds a new `ResponseBody` that returns the given data.",8,{"inputs":[{"name":"d"}],"output":{"name":"responsebody"}}],[11,"from_file","","Builds a new `ResponseBody` that returns the content of the given file.",8,{"inputs":[{"name":"file"}],"output":{"name":"responsebody"}}],[11,"from_string","","Builds a new `ResponseBody` that returns an UTF-8 string.",8,{"inputs":[{"name":"s"}],"output":{"name":"responsebody"}}],[11,"eq","","",1,null],[11,"fmt","","",1,null],[11,"clone","","",1,null],[11,"description","","",1,null],[11,"fmt","","",1,null],[11,"fake_http","","Builds a fake HTTP request to be used during tests.",9,{"inputs":[{"name":"m"},{"name":"u"},{"name":"vec"},{"name":"vec"}],"output":{"name":"request"}}],[11,"fake_http_from","","Builds a fake HTTP request to be used during tests.",9,{"inputs":[{"name":"socketaddr"},{"name":"m"},{"name":"u"},{"name":"vec"},{"name":"vec"}],"output":{"name":"request"}}],[11,"fake_https","","Builds a fake HTTPS request to be used during tests.",9,{"inputs":[{"name":"m"},{"name":"u"},{"name":"vec"},{"name":"vec"}],"output":{"name":"request"}}],[11,"fake_https_from","","Builds a fake HTTPS request to be used during tests.",9,{"inputs":[{"name":"socketaddr"},{"name":"m"},{"name":"u"},{"name":"vec"},{"name":"vec"}],"output":{"name":"request"}}],[11,"secure","","Returns `true` if the request uses HTTPS instead of HTTP.",9,null],[11,"method","","Returns the method of the request (`GET`, `POST`, etc.).",9,null],[11,"raw_url","","Returns the URL requested by the client. It is not decoded and thus can contain strings\nsuch as `%20`.",9,null],[11,"url","","Returns the URL requested by the client.",9,null],[11,"get_param","","Returns the value of a GET parameter.\nTODO: clumbsy",9,null],[11,"header","","Returns the value of a header of the request.",9,null],[11,"data","","UNSTABLE. Returns the body of the request.",9,null],[11,"remote_addr","","Returns the address of the client that made this request.",9,null],[14,"find_route!","","Evaluates each parameter until one of them evaluates to something else\nthan `Err(RouteError::NoRouteFound)`.",null,null],[14,"router!","","Equivalent to a `match` expression but for routes.",null,null]],"paths":[[3,"Response"],[4,"RouteError"],[3,"HttpAuthCredentials"],[4,"JsonError"],[4,"PostError"],[3,"SessionsManager"],[3,"Session"],[3,"LogEntry"],[3,"ResponseBody"],[3,"Request"]]}; initSearch(searchIndex);