pub fn finish(self) -> Result<CsrfConfig, CsrfConfigError> {
        let config = self.config;
        if config.ttl_seconds < 0 {
            return Err(CsrfConfigError::InvalidTtl);
        }

        if config.protected_methods.is_empty() {
            return Err(CsrfConfigError::NoProtectedMethods);
        }
        Ok(config)
    }
/// Validate and build the `CsrfConfig`.
Validate and build the `CsrfConfig`.
Validate and build the ` CsrfConfig ` .
pub fn finish(self) -> Result<CsrfConfig, CsrfConfigError> {
        let config = self.config;
        if config.ttl_seconds < 0 {
            return Err(CsrfConfigError::InvalidTtl);
        }
        if config.protected_methods.is_empty() {
            return Err(CsrfConfigError::NoProtectedMethods);
        }
        Ok(config)
    }
pub fn finish ( self ) -> Result < CsrfConfig , CsrfConfigError > { let config = self . config ; if config . ttl_seconds < 0 { return Err ( CsrfConfigError :: InvalidTtl ) ; } if config . protected_methods . is_empty ( ) { return Err ( CsrfConfigError :: NoProtectedMethods ) ; } Ok ( config ) }
Validate and build the `CsrfConfig`.
Validate and build the ` CsrfConfig ` .
self
self