pub struct SSRender<ErrorWriter: Writer + From<Error> + From<Error> = Error> { /* private fields */ }Implementations§
Source§impl<ErrorWriter: Writer + From<Error> + From<Error> + Send + Sync + 'static> SSRender<ErrorWriter>
impl<ErrorWriter: Writer + From<Error> + From<Error> + Send + Sync + 'static> SSRender<ErrorWriter>
pub fn new(host: &str) -> Self
pub fn host(&self) -> &str
pub fn set_pub_dir_name(&mut self, path: &str)
pub fn set_tmpl_dir_name(&mut self, path: &str)
pub fn register_function<F: Function + 'static>(&mut self, k: String, f: F)
pub fn rm_registed_function(&mut self, k: String)
pub fn registed_functions( &self, ) -> &HashMap<String, Arc<dyn Function + 'static>>
pub fn register_filter<F: Filter + 'static>(&mut self, k: String, f: F)
pub fn rm_registed_filter(&mut self, k: String)
pub fn registed_filters(&self) -> &HashMap<String, Arc<dyn Filter + 'static>>
pub fn pub_dir_name(&self) -> &str
pub fn tmpl_dir_name(&self) -> &str
pub fn set_ctx_generator( &mut self, f: impl Fn(&Request) -> HashMap<String, Value> + 'static + Send + Sync, )
pub fn rm_ctx_generator(&mut self)
pub fn gen_tera_builder(&self) -> TeraBuilder
pub fn set_default_file_postfix(&mut self, postfix: &str)
pub fn default_file_postfix(&self) -> &str
pub fn set_listing_assets(&mut self, v: bool)
pub fn listing_assets(&self) -> bool
pub fn set_default_assets_filename(&mut self, v: &str)
pub fn default_assets_filename(&self) -> &Option<String>
pub fn set_hook_view_path<F: Fn(&mut Request, String) -> String + 'static + Send + Sync>( &mut self, hook: Option<F>, )
pub fn hook_view_path( &self, ) -> &Option<Arc<dyn Fn(&mut Request, String) -> String + Send + Sync>>
pub async fn serve( &self, extend_router: Option<Router>, catcher: Option<Catcher>, )
Auto Trait Implementations§
impl<ErrorWriter> Freeze for SSRender<ErrorWriter>
impl<ErrorWriter = Error> !RefUnwindSafe for SSRender<ErrorWriter>
impl<ErrorWriter> Send for SSRender<ErrorWriter>where
ErrorWriter: Send,
impl<ErrorWriter> Sync for SSRender<ErrorWriter>where
ErrorWriter: Sync,
impl<ErrorWriter> Unpin for SSRender<ErrorWriter>where
ErrorWriter: Unpin,
impl<ErrorWriter = Error> !UnwindSafe for SSRender<ErrorWriter>
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