added docstring to builder

This commit is contained in:
epi
2021-01-16 14:14:18 -06:00
parent 947f1b8a33
commit d65294c4e2

View File

@@ -138,6 +138,9 @@ impl<'a> ExtractorBuilder<'a> {
self
}
/// finalize configuration of ExtratorBuilder and return an Extractor
///
/// requires either with_url or with_response to have been used in the build process
pub fn build(&self) -> Result<Extractor<'a>> {
if self.url.is_empty() && self.response.is_none() {
bail!("Extractor requires either a URL or a FeroxResponse be specified")