[−][src]Struct bracket::parser::ast::Link
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 an owned value has been set it is preferred.
pub fn title(&self) -> &str
[src]
Get the link title.
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 title_span(&self) -> &Range<usize>
[src]
Get the span for the title.
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 title_start(&mut self, start: usize)
[src]
Update the start of the title span.
pub fn title_end(&mut self, end: usize)
[src]
Update the end of the title 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.
pub fn set_title(&mut self, value: String)
[src]
Set an owned value for the title.
Only available when the parser detects escape sequences in the input.
pub fn is_escaped(&self) -> bool
[src]
Determine if this link has been escaped using a leading backslash.
Trait Implementations
impl<'_> Debug for Link<'_>
[src]
impl<'_> Display for Link<'_>
[src]
impl<'source> Element<'source> for Link<'source>
[src]
pub fn open(&self) -> &'source str
[src]
pub fn close(&self) -> &'source str
[src]
pub fn open_span(&self) -> &Range<usize>
[src]
pub fn close_span(&self) -> &Option<Range<usize>>
[src]
pub fn is_closed(&self) -> bool
[src]
pub fn exit(&mut self, span: Range<usize>)
[src]
pub fn span(&self) -> Range<usize>
[src]
impl<'source> Eq for Link<'source>
[src]
impl<'source> Lines for Link<'source>
[src]
pub fn lines(&self) -> &Range<usize>
[src]
pub fn lines_mut(&mut self) -> &mut Range<usize>
[src]
pub fn lines_end(&mut self, line: &usize)
[src]
impl<'source> PartialEq<Link<'source>> for Link<'source>
[src]
pub fn eq(&self, other: &Link<'source>) -> bool
[src]
pub fn ne(&self, other: &Link<'source>) -> bool
[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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
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.
pub 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>,