pub struct LinkFinder { /* private fields */ }
Expand description

A configured link finder.

Implementations

Create a new link finder with the default options for finding all kinds of links.

If you only want to find a certain kind of links, use the kinds method.

Require the domain parts of email addresses to have at least one dot. Use false to also find addresses such as root@localhost.

Set whether URLs must have a scheme, defaults to true.

By default only URLs having a scheme defined are found. By setting this to false you make the scheme of URLs optional, to also find URLs like example.org. For some URLs the used scheme is important, and making the scheme optional may lead to finding a lot of false positive URLs.

Restrict the kinds of links that should be found to the specified ones.

Find links in the specified input text.

Returns an Iterator which only scans when next is called (lazy).

Iterate over spans in the specified input text.

A span represents a substring of the input text, which can either be a link, or plain text.

Returns an Iterator which only scans when next is called (lazy).

The spans that are returned by the Iterator are consecutive, and when combined represent the input text in its entirety.

Trait Implementations

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.