[][src]Struct linkcheck::validation::Options

pub struct Options { /* fields omitted */ }

Options to be used with resolve_link().

Implementations

impl Options[src]

pub const DEFAULT_FILE: &'static str[src]

The name used by Options::default_file().

pub fn default_alternate_extensions(
) -> impl IntoIterator<Item = (OsString, impl IntoIterator<Item = OsString>)>
[src]

A mapping of possible alternate extensions to try when checking a filesystem link.

pub fn new() -> Self[src]

Create a new Options populated with some sane defaults.

pub fn root_directory(&self) -> Option<&Path>[src]

Get the root directory, if one was provided.

pub fn with_root_directory<P: AsRef<Path>>(
    self,
    root_directory: P
) -> Result<Self>
[src]

Set the Options::root_directory(), automatically converting to its canonical form with dunce::canonicalize().

pub fn default_file(&self) -> &OsStr[src]

The default file name to use when a directory is linked to.

pub fn set_default_file<O: Into<OsString>>(self, default_file: O) -> Self[src]

pub fn alternate_extensions(
    &self
) -> impl Iterator<Item = (&OsStr, impl Iterator<Item = &OsStr>)>
[src]

Get the map of alternate extensions to use when checking.

By default we only map *.md to *.html (Options::default_alternate_extensions()).

pub fn set_alternate_extensions<S, I, V>(self, alternates: I) -> Self where
    I: IntoIterator<Item = (S, V)>,
    S: Into<OsString>,
    V: IntoIterator<Item = S>, 
[src]

Are links allowed to go outside of the Options::root_directory()?

pub fn set_custom_validation<F>(self, custom_validation: F) -> Self where
    F: Fn(&Path, Option<&str>) -> Result<(), Reason> + 'static, 
[src]

Set a function which will be executed after a link is resolved, allowing you to apply custom business logic.

Trait Implementations

impl Clone for Options[src]

impl Debug for Options[src]

impl Default for Options[src]

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

impl PartialEq<Options> for Options[src]

impl Serialize for Options[src]

Auto Trait Implementations

impl !RefUnwindSafe for Options

impl !Send for Options

impl !Sync for Options

impl Unpin for Options

impl !UnwindSafe for Options

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, 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.