Struct docserver::defs::req_handler::ReqHandler
source · pub struct ReqHandler<'a> {
pub req_header: ReqHeaderMap,
pub app_dbs: &'a AppDBs,
pub lang: Local,
pub uri: &'a Uri,
pub notify_data: UserNotifyData,
pub auth_state: AuthState,
pub req_name: String,
pub context: Context,
}
Fields§
§req_header: ReqHeaderMap
§app_dbs: &'a AppDBs
§lang: Local
§uri: &'a Uri
§notify_data: UserNotifyData
§auth_state: AuthState
§req_name: String
§context: Context
Implementations§
source§impl<'a> ReqHandler<'a>
impl<'a> ReqHandler<'a>
pub fn new( req_header: ReqHeaderMap, app_dbs: &'a AppDBs, uri: &'a Uri, auth_state: &'a AuthState, req_name: &str ) -> Self
sourcepub fn load_md_template_file(
&mut self,
tpl_path: &str,
tpl_file: &str,
in_html: bool,
dflt_content: &str
)
pub fn load_md_template_file( &mut self, tpl_path: &str, tpl_file: &str, in_html: bool, dflt_content: &str )
Find a md
template file under templates_path/md/server.name/req_path
or under templates_path/md/req_path
render if found path or return dflt_content