[][src]Struct linkify::LinkFinder

pub struct LinkFinder { /* fields omitted */ }

A configured link finder.

Methods

impl LinkFinder[src]

pub fn new() -> LinkFinder[src]

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.

pub fn email_domain_must_have_dot(&mut self, value: bool) -> &mut LinkFinder[src]

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

pub fn kinds(&mut self, kinds: &[LinkKind]) -> &mut LinkFinder[src]

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

Important traits for Spans<'t>
pub fn spans<'t>(&self, text: &'t str) -> Spans<'t>[src]

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

impl Default for LinkFinder[src]

impl Debug for LinkFinder[src]

Auto Trait Implementations

Blanket Implementations

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

impl<T, U> Into<U> for T where
    U: From<T>, 
[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.

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

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

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