[][src]Struct mdbook_linkcheck::Config

pub struct Config {
    pub follow_web_links: bool,
    pub traverse_parent_directories: bool,
    pub exclude: Vec<HashedRegex>,
    pub user_agent: String,
    pub cache_timeout: u64,
    pub warning_policy: WarningPolicy,
    pub http_headers: HashMap<HashedRegex, Vec<HttpHeader>>,
}

The configuration options available with this backend.

Fields

follow_web_links: bool

If a link on the internet is encountered, should we still try to check if it's valid? Defaults to false because this has a big performance impact.

traverse_parent_directories: bool

Are we allowed to link to files outside of the book's source directory?

exclude: Vec<HashedRegex>

A list of URL patterns to ignore when checking remote links.

user_agent: String

The user-agent used whenever any web requests are made.

cache_timeout: u64

The number of seconds a cached result is valid for.

warning_policy: WarningPolicy

The policy to use when warnings are encountered.

http_headers: HashMap<HashedRegex, Vec<HttpHeader>>

The map of regexes representing sets of web sites and the list of HTTP headers that must be sent to matching sites.

Implementations

impl Config[src]

pub const DEFAULT_CACHE_TIMEOUT: Duration[src]

The default cache timeout (around 12 hours).

pub const DEFAULT_USER_AGENT: &'static str[src]

The default user-agent.

pub fn should_skip(&self, link: &str) -> bool[src]

Checks Config::exclude to see if the provided link should be skipped.

Trait Implementations

impl Clone for Config[src]

impl Debug for Config[src]

impl Default for Config[src]

impl<'de> Deserialize<'de> for Config where
    Config: Default
[src]

impl PartialEq<Config> for Config[src]

impl Serialize for Config[src]

impl StructuralPartialEq for Config[src]

Auto Trait Implementations

impl !RefUnwindSafe for Config

impl Send for Config

impl Sync for Config

impl Unpin for Config

impl UnwindSafe for Config

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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

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

impl<T> Instrument for T[src]

impl<T> Instrument 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, 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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,