pub enum WarningReason {
InvalidDirectiveFormat,
DirectiveKeyIsEmpty,
UnsupportedDirectiveKey(String),
UserAgentCannotBeEmpty,
DirectiveWithoutUserAgent,
ParseCrawlDelayError(ParseFloatError),
WrongRequestRateFormat,
ParseRequestRate(ParseIntError),
ParseUrl(ParseError),
WrongCleanParamFormat,
IgnoredCleanParams(Vec<String>),
WrongPathFormat,
}
Expand description
Warning reason of robots.txt parser about problems when parsing robots.txt file.
Variants§
InvalidDirectiveFormat
Invalid directive format. Invalid directive example: :
DirectiveKeyIsEmpty
Directive key is empty. Invalid directive example: : <Value>
UnsupportedDirectiveKey(String)
Directive key is not suppored by this parser.
UserAgentCannotBeEmpty
Passed directive key is User-Agent
and passed value is empty.
DirectiveWithoutUserAgent
It is impossible to process this directive before the User-Agent
directive has not been processed.
ParseCrawlDelayError(ParseFloatError)
It is impossible to process the Crawl-Delay
directive because of an error when parsing a floating point number.
WrongRequestRateFormat
Incorrect format of the Request-Rate
directive. Example of the correct format: Request-rate: 1/5
ParseRequestRate(ParseIntError)
Incorrect format of the Request-Rate
directive. Example of the correct format: Request-rate: 1/5
ParseUrl(ParseError)
Parsing URL error.
WrongCleanParamFormat
Incorrect format of the Clean-Param
directive.
Parameters must be matched to regular expression: A-Za-z0-9.-_
.
Example of the correct format: Clean-param: ref1&ref2 /some_dir/get_book.pl
IgnoredCleanParams(Vec<String>)
Some parameters of the Clean-Param
directive has wrong symbols.
Parameters must be matched to regular expression: A-Za-z0-9.-_
.
Example of the correct format: Clean-param: ref1&ref2 /some_dir/get_book.pl
WrongPathFormat
Error in URL path format.
Trait Implementations§
Source§impl Clone for WarningReason
impl Clone for WarningReason
Source§fn clone(&self) -> WarningReason
fn clone(&self) -> WarningReason
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more