/// Checks, by the user's custom logic, if this template should revalidate. This function isn't presently parsed anything, but has
/// network access etc., and can really do whatever it likes. Errors here can be caused by either the server or the client, so the
/// user must specify an [`ErrorCause`].
Checks, by the user's custom logic, if this template should revalidate. This function isn't presently parsed anything, but has
network access etc., and can really do whatever it likes. Errors here can be caused by either the server or the client, so the
user must specify an [`ErrorCause`].
Checks by the user ' s custom logic if this template should revalidate . This function isn ' t presently parsed anything but has network access etc . and can really do whatever it likes . Errors here can be caused by either the server or the client so the user must specify an [ ` ErrorCause ` ] .
pub async fn should_revalidate(&self) -> Result<bool, ServerError> {
        if let Some(should_revalidate) = &self.should_revalidate {
            let res = should_revalidate.call().await;
            match res {
                Ok(res) => Ok(res),
                Err(GenericErrorWithCause { error, cause }) => Err(ServerError::RenderFnFailed {
                    fn_name: "should_revalidate".to_string(),
                    template_name: self.get_path(),
                    cause,
                    source: error,
                }),
            }
        } else {
            Err(BuildError::TemplateFeatureNotEnabled {
                template_name: self.path.clone(),
                feature_name: "should_revalidate".to_string(),
            }
            .into())
        }
    }
pub async fn should_revalidate ( & self ) -> Result < bool , ServerError > { if let Some ( should_revalidate ) = & self . should_revalidate { let res = should_revalidate . call ( ) . await ; match res { Ok ( res ) => Ok ( res ) , Err ( GenericErrorWithCause { error , cause } ) => Err ( ServerError :: RenderFnFailed { fn_name : " " . to_string ( ) , template_name : self . get_path ( ) , cause , source : error , } ) , } } else { Err ( BuildError :: TemplateFeatureNotEnabled { template_name : self . path . clone ( ) , feature_name : " " . to_string ( ) , } . into ( ) ) } }
Checks, by the user's custom logic, if this template should revalidate.
Checks by the user ' s custom logic if this template should revalidate .
&self