[][src]Struct robots_txt::parts::section::Section

pub struct Section<'a> {
    pub crawl_delay: Option<f64>,
    pub req_rate: Option<RequestRate>,
    pub rules: Vec<Rule<'a>>,
    pub sitemaps: BTreeSet<Url>,
    pub useragents: BTreeSet<Cow<'a, str>>,
}

Fields

crawl_delay: Option<f64>req_rate: Option<RequestRate>rules: Vec<Rule<'a>>sitemaps: BTreeSet<Url>useragents: BTreeSet<Cow<'a, str>>

Methods

impl<'a> Section<'a>[src]

pub fn empty() -> Self[src]

pub fn is_empty(&self) -> bool[src]

pub fn has_rules(&self) -> bool[src]

pub fn is_default(&self) -> bool[src]

pub fn merge(&mut self, other: Section<'a>)[src]

pub fn push_ua<U>(&mut self, ua: U) where
    U: Into<Cow<'a, str>>, 
[src]

pub fn push_rule(&mut self, rule: Rule<'a>)[src]

pub fn push_sitemap(&mut self, url: &str) -> Result<(), UrlParseError>[src]

Trait Implementations

impl<'a> Clone for Section<'a>[src]

impl<'a> Debug for Section<'a>[src]

impl<'a> Default for Section<'a>[src]

impl<'a> Display for Section<'a>[src]

impl<'a> PartialEq<Section<'a>> for Section<'a>[src]

impl<'a> StructuralPartialEq for Section<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for Section<'a>

impl<'a> Send for Section<'a>

impl<'a> Sync for Section<'a>

impl<'a> Unpin for Section<'a>

impl<'a> UnwindSafe for Section<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.