[][src]Struct linkify::Span

pub struct Span<'t> { /* fields omitted */ }

Span within the input text.

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

Methods

impl<'t> Span<'t>[src]

pub fn start(&self) -> usize[src]

The start index of the span within the input text.

pub fn end(&self) -> usize[src]

The end index of the span.

pub fn as_str(&self) -> &'t str[src]

Get the span text as a str.

pub fn kind(&self) -> Option<&LinkKind>[src]

The type of link included in the span, if any.

Returns None if the span represents plain text.

Trait Implementations

impl<'t> Debug for Span<'t>[src]

Auto Trait Implementations

impl<'t> Unpin for Span<'t>

impl<'t> Sync for Span<'t>

impl<'t> Send for Span<'t>

impl<'t> UnwindSafe for Span<'t>

impl<'t> RefUnwindSafe for Span<'t>

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]