[−][src]Struct linkify::LinkFinder
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.
ⓘImportant traits for Links<'t>pub fn links<'t>(&self, text: &'t str) -> Links<'t>
[src]
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
impl Unpin for LinkFinder
impl Sync for LinkFinder
impl Send for LinkFinder
impl UnwindSafe for LinkFinder
impl RefUnwindSafe for LinkFinder
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,