[][src]Struct bracket::parser::ast::Link

pub struct Link<'source> { /* fields omitted */ }

Link node for wiki-style links.

Implementations

impl<'source> Link<'source>[src]

pub fn new(source: &'source str, open: Range<usize>, line: Range<usize>) -> Self[src]

Create a new link.

pub fn href(&self) -> &str[src]

Get the link href.

If an owned value has been set it is preferred.

pub fn label(&self) -> &str[src]

Get the link label.

If the label is the empty string the href will be used instead.

If an owned value has been set it is preferred.

pub fn href_span(&self) -> &Range<usize>[src]

Get the span for the href.

pub fn label_span(&self) -> &Range<usize>[src]

Get the span for the label.

pub fn href_end(&mut self, end: usize)[src]

Update the end of the href span.

pub fn label_start(&mut self, start: usize)[src]

Update the start of the label span.

pub fn label_end(&mut self, end: usize)[src]

Update the end of the label span.

pub fn set_href(&mut self, value: String)[src]

Set an owned value for the href.

Only available when the parser detects escape sequences in the input.

pub fn set_label(&mut self, value: String)[src]

Set an owned value for the label.

Only available when the parser detects escape sequences in the input.

Trait Implementations

impl<'_> Debug for Link<'_>[src]

impl<'_> Display for Link<'_>[src]

impl<'source> Element<'source> for Link<'source>[src]

impl<'source> Eq for Link<'source>[src]

impl<'source> Lines for Link<'source>[src]

impl<'source> PartialEq<Link<'source>> for Link<'source>[src]

impl<'source> Slice<'source> for Link<'source>[src]

impl<'source> StructuralEq for Link<'source>[src]

impl<'source> StructuralPartialEq for Link<'source>[src]

Auto Trait Implementations

impl<'source> RefUnwindSafe for Link<'source>

impl<'source> Send for Link<'source>

impl<'source> Sync for Link<'source>

impl<'source> Unpin for Link<'source>

impl<'source> UnwindSafe for Link<'source>

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> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[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.