Link

Struct Link 

Source
#[non_exhaustive]
pub struct Link { /* private fields */ }
Expand description

The HTML <link> element

MDN Documentation

Implementations§

Source

pub fn builder() -> LinkBuilder

Create a new builder

Source

pub fn data_map(&self) -> &DataMap

Access the element’s data-* properties

Source

pub fn data_map_mut(&mut self) -> &mut DataMap

Mutably access the element’s data-* properties

Source

pub fn href(&self) -> Option<&str>

Get the value of the href attribute

Source

pub fn set_href(&mut self, value: Option<impl Into<Cow<'static, str>>>)

Set the value of the href attribute

Source

pub fn crossorigin(&self) -> Option<&str>

Get the value of the crossorigin attribute

Source

pub fn set_crossorigin(&mut self, value: Option<impl Into<Cow<'static, str>>>)

Set the value of the crossorigin attribute

Source

pub fn rel(&self) -> Option<&str>

Get the value of the rel attribute

Source

pub fn set_rel(&mut self, value: Option<impl Into<Cow<'static, str>>>)

Set the value of the rel attribute

Source

pub fn media(&self) -> Option<&str>

Get the value of the media attribute

Source

pub fn set_media(&mut self, value: Option<impl Into<Cow<'static, str>>>)

Set the value of the media attribute

Source

pub fn integrity(&self) -> Option<&str>

Get the value of the integrity attribute

Source

pub fn set_integrity(&mut self, value: Option<impl Into<Cow<'static, str>>>)

Set the value of the integrity attribute

Source

pub fn hreflang(&self) -> Option<&str>

Get the value of the hreflang attribute

Source

pub fn set_hreflang(&mut self, value: Option<impl Into<Cow<'static, str>>>)

Set the value of the hreflang attribute

Source

pub fn type_(&self) -> Option<&str>

Get the value of the type attribute

Source

pub fn set_type_(&mut self, value: Option<impl Into<Cow<'static, str>>>)

Set the value of the type attribute

Source

pub fn referrerpolicy(&self) -> Option<&str>

Get the value of the referrerpolicy attribute

Source

pub fn set_referrerpolicy( &mut self, value: Option<impl Into<Cow<'static, str>>>, )

Set the value of the referrerpolicy attribute

Source

pub fn sizes(&self) -> Option<&str>

Get the value of the sizes attribute

Source

pub fn set_sizes(&mut self, value: Option<impl Into<Cow<'static, str>>>)

Set the value of the sizes attribute

Source

pub fn imagesrcset(&self) -> Option<&str>

Get the value of the imagesrcset attribute

Source

pub fn set_imagesrcset(&mut self, value: Option<impl Into<Cow<'static, str>>>)

Set the value of the imagesrcset attribute

Source

pub fn imagesizes(&self) -> Option<&str>

Get the value of the imagesizes attribute

Source

pub fn set_imagesizes(&mut self, value: Option<impl Into<Cow<'static, str>>>)

Set the value of the imagesizes attribute

Source

pub fn as_(&self) -> Option<&str>

Get the value of the as attribute

Source

pub fn set_as_(&mut self, value: Option<impl Into<Cow<'static, str>>>)

Set the value of the as attribute

Source

pub fn blocking(&self) -> Option<&str>

Get the value of the blocking attribute

Source

pub fn set_blocking(&mut self, value: Option<impl Into<Cow<'static, str>>>)

Set the value of the blocking attribute

Source

pub fn color(&self) -> Option<&str>

Get the value of the color attribute

Source

pub fn set_color(&mut self, value: Option<impl Into<Cow<'static, str>>>)

Set the value of the color attribute

Source

pub fn disabled(&self) -> Option<&str>

Get the value of the disabled attribute

Source

pub fn set_disabled(&mut self, value: Option<impl Into<Cow<'static, str>>>)

Set the value of the disabled attribute

Source

pub fn fetchpriority(&self) -> Option<&str>

Get the value of the fetchpriority attribute

Source

pub fn set_fetchpriority(&mut self, value: Option<impl Into<Cow<'static, str>>>)

Set the value of the fetchpriority attribute

Source

pub fn access_key(&self) -> Option<&str>

Get the value of the accesskey attribute

Source

pub fn set_access_key(&mut self, value: Option<impl Into<Cow<'static, str>>>)

Set the value of the accesskey attribute

Source

pub fn auto_capitalize(&self) -> Option<&str>

Get the value of the autocapitalize attribute

Source

pub fn set_auto_capitalize( &mut self, value: Option<impl Into<Cow<'static, str>>>, )

Set the value of the autocapitalize attribute

Source

pub fn autofocus(&self) -> bool

Get the value of the autofocus attribute

Source

pub fn set_autofocus(&mut self, value: bool)

Set the value of the autofocus attribute

Source

pub fn class(&self) -> Option<&str>

Get the value of the class attribute

Source

pub fn set_class(&mut self, value: Option<impl Into<Cow<'static, str>>>)

Set the value of the class attribute

Source

pub fn content_editable(&self) -> Option<&str>

Get the value of the contenteditable attribute

Source

pub fn set_content_editable( &mut self, value: Option<impl Into<Cow<'static, str>>>, )

Set the value of the contenteditable attribute

Source

pub fn direction(&self) -> Option<&str>

Get the value of the dir attribute

Source

pub fn set_direction(&mut self, value: Option<impl Into<Cow<'static, str>>>)

Set the value of the dir attribute

Source

pub fn draggable(&self) -> bool

Get the value of the draggable attribute

Source

pub fn set_draggable(&mut self, value: bool)

Set the value of the draggable attribute

Source

pub fn enter_key_hint(&self) -> Option<&str>

Get the value of the enterkeyhint attribute

Source

pub fn set_enter_key_hint( &mut self, value: Option<impl Into<Cow<'static, str>>>, )

Set the value of the enterkeyhint attribute

Source

pub fn export_parts(&self) -> Option<&str>

Get the value of the exportparts attribute

Source

pub fn set_export_parts(&mut self, value: Option<impl Into<Cow<'static, str>>>)

Set the value of the exportparts attribute

Source

pub fn hidden(&self) -> Option<&str>

Get the value of the hidden attribute

Source

pub fn set_hidden(&mut self, value: Option<impl Into<Cow<'static, str>>>)

Set the value of the hidden attribute

Source

pub fn id(&self) -> Option<&str>

Get the value of the id attribute

Source

pub fn set_id(&mut self, value: Option<impl Into<Cow<'static, str>>>)

Set the value of the id attribute

Source

pub fn inert(&self) -> bool

Get the value of the inert attribute

Source

pub fn set_inert(&mut self, value: bool)

Set the value of the inert attribute

Source

pub fn input_mode(&self) -> Option<&str>

Get the value of the inputmode attribute

Source

pub fn set_input_mode(&mut self, value: Option<impl Into<Cow<'static, str>>>)

Set the value of the inputmode attribute

Source

pub fn is_(&self) -> Option<&str>

Get the value of the is attribute

Source

pub fn set_is_(&mut self, value: Option<impl Into<Cow<'static, str>>>)

Set the value of the is attribute

Source

pub fn item_id(&self) -> Option<&str>

Get the value of the itemid attribute

Source

pub fn set_item_id(&mut self, value: Option<impl Into<Cow<'static, str>>>)

Set the value of the itemid attribute

Source

pub fn item_prop(&self) -> Option<&str>

Get the value of the itemprop attribute

Source

pub fn set_item_prop(&mut self, value: Option<impl Into<Cow<'static, str>>>)

Set the value of the itemprop attribute

Source

pub fn item_ref(&self) -> Option<&str>

Get the value of the itemref attribute

Source

pub fn set_item_ref(&mut self, value: Option<impl Into<Cow<'static, str>>>)

Set the value of the itemref attribute

Source

pub fn item_scope(&self) -> Option<&str>

Get the value of the itemscope attribute

Source

pub fn set_item_scope(&mut self, value: Option<impl Into<Cow<'static, str>>>)

Set the value of the itemscope attribute

Source

pub fn item_type(&self) -> Option<&str>

Get the value of the itemtype attribute

Source

pub fn set_item_type(&mut self, value: Option<impl Into<Cow<'static, str>>>)

Set the value of the itemtype attribute

Source

pub fn lang(&self) -> Option<&str>

Get the value of the lang attribute

Source

pub fn set_lang(&mut self, value: Option<impl Into<Cow<'static, str>>>)

Set the value of the lang attribute

Source

pub fn nonce(&self) -> Option<&str>

Get the value of the nonce attribute

Source

pub fn set_nonce(&mut self, value: Option<impl Into<Cow<'static, str>>>)

Set the value of the nonce attribute

Source

pub fn part(&self) -> Option<&str>

Get the value of the part attribute

Source

pub fn set_part(&mut self, value: Option<impl Into<Cow<'static, str>>>)

Set the value of the part attribute

Source

pub fn slot(&self) -> Option<&str>

Get the value of the slot attribute

Source

pub fn set_slot(&mut self, value: Option<impl Into<Cow<'static, str>>>)

Set the value of the slot attribute

Source

pub fn spellcheck(&self) -> Option<&str>

Get the value of the spellcheck attribute

Source

pub fn set_spellcheck(&mut self, value: Option<impl Into<Cow<'static, str>>>)

Set the value of the spellcheck attribute

Source

pub fn style(&self) -> Option<&str>

Get the value of the style attribute

Source

pub fn set_style(&mut self, value: Option<impl Into<Cow<'static, str>>>)

Set the value of the style attribute

Source

pub fn tab_index(&self) -> Option<i64>

Get the value of the tabindex attribute

Source

pub fn set_tab_index(&mut self, value: Option<i64>)

Set the value of the tabindex attribute

Source

pub fn title(&self) -> Option<&str>

Get the value of the title attribute

Source

pub fn set_title(&mut self, value: Option<impl Into<Cow<'static, str>>>)

Set the value of the title attribute

Source

pub fn translate(&self) -> bool

Get the value of the translate attribute

Source

pub fn set_translate(&mut self, value: bool)

Set the value of the translate attribute

Trait Implementations§

Source§

fn clone(&self) -> Link

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

fn default() -> Link

Returns the “default value” for a type. Read more
Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<Link> for AbbreviationChild

Source§

fn from(value: Link) -> Self

Converts to this type from the input type.
Source§

impl From<Link> for AddressChild

Source§

fn from(value: Link) -> Self

Converts to this type from the input type.
Source§

impl From<Link> for AnchorChild

Source§

fn from(value: Link) -> Self

Converts to this type from the input type.
Source§

impl From<Link> for ArticleChild

Source§

fn from(value: Link) -> Self

Converts to this type from the input type.
Source§

impl From<Link> for AsideChild

Source§

fn from(value: Link) -> Self

Converts to this type from the input type.
Source§

impl From<Link> for AudioChild

Source§

fn from(value: Link) -> Self

Converts to this type from the input type.
Source§

impl From<Link> for BidirectionalIsolateChild

Source§

fn from(value: Link) -> Self

Converts to this type from the input type.
Source§

impl From<Link> for BidirectionalTextOverrideChild

Source§

fn from(value: Link) -> Self

Converts to this type from the input type.
Source§

impl From<Link> for BlockQuoteChild

Source§

fn from(value: Link) -> Self

Converts to this type from the input type.
Source§

impl From<Link> for BodyChild

Source§

fn from(value: Link) -> Self

Converts to this type from the input type.
Source§

impl From<Link> for BoldChild

Source§

fn from(value: Link) -> Self

Converts to this type from the input type.
Source§

impl From<Link> for ButtonChild

Source§

fn from(value: Link) -> Self

Converts to this type from the input type.
Source§

impl From<Link> for CanvasChild

Source§

fn from(value: Link) -> Self

Converts to this type from the input type.
Source§

impl From<Link> for CaptionChild

Source§

fn from(value: Link) -> Self

Converts to this type from the input type.
Source§

impl From<Link> for CiteChild

Source§

fn from(value: Link) -> Self

Converts to this type from the input type.
Source§

impl From<Link> for CodeChild

Source§

fn from(value: Link) -> Self

Converts to this type from the input type.
Source§

impl From<Link> for DataChild

Source§

fn from(value: Link) -> Self

Converts to this type from the input type.
Source§

impl From<Link> for DataListChild

Source§

fn from(value: Link) -> Self

Converts to this type from the input type.
Source§

impl From<Link> for DefinitionChild

Source§

fn from(value: Link) -> Self

Converts to this type from the input type.
Source§

impl From<Link> for DeletedTextChild

Source§

fn from(value: Link) -> Self

Converts to this type from the input type.
Source§

impl From<Link> for DescriptionDetailsChild

Source§

fn from(value: Link) -> Self

Converts to this type from the input type.
Source§

impl From<Link> for DescriptionTermChild

Source§

fn from(value: Link) -> Self

Converts to this type from the input type.
Source§

impl From<Link> for DetailsChild

Source§

fn from(value: Link) -> Self

Converts to this type from the input type.
Source§

impl From<Link> for DialogChild

Source§

fn from(value: Link) -> Self

Converts to this type from the input type.
Source§

impl From<Link> for DivisionChild

Source§

fn from(value: Link) -> Self

Converts to this type from the input type.
Source§

impl From<Link> for EmphasisChild

Source§

fn from(value: Link) -> Self

Converts to this type from the input type.
Source§

impl From<Link> for FieldsetChild

Source§

fn from(value: Link) -> Self

Converts to this type from the input type.
Source§

impl From<Link> for FigureCaptionChild

Source§

fn from(value: Link) -> Self

Converts to this type from the input type.
Source§

impl From<Link> for FigureChild

Source§

fn from(value: Link) -> Self

Converts to this type from the input type.
Source§

impl From<Link> for FooterChild

Source§

fn from(value: Link) -> Self

Converts to this type from the input type.
Source§

impl From<Link> for FormChild

Source§

fn from(value: Link) -> Self

Converts to this type from the input type.
Source§

impl From<Link> for HeadChild

Source§

fn from(value: Link) -> Self

Converts to this type from the input type.
Source§

impl From<Link> for HeaderChild

Source§

fn from(value: Link) -> Self

Converts to this type from the input type.
Source§

impl From<Link> for Heading1Child

Source§

fn from(value: Link) -> Self

Converts to this type from the input type.
Source§

impl From<Link> for Heading2Child

Source§

fn from(value: Link) -> Self

Converts to this type from the input type.
Source§

impl From<Link> for Heading3Child

Source§

fn from(value: Link) -> Self

Converts to this type from the input type.
Source§

impl From<Link> for Heading4Child

Source§

fn from(value: Link) -> Self

Converts to this type from the input type.
Source§

impl From<Link> for Heading5Child

Source§

fn from(value: Link) -> Self

Converts to this type from the input type.
Source§

impl From<Link> for Heading6Child

Source§

fn from(value: Link) -> Self

Converts to this type from the input type.
Source§

impl From<Link> for ImageMapChild

Source§

fn from(value: Link) -> Self

Converts to this type from the input type.
Source§

impl From<Link> for InsertedTextChild

Source§

fn from(value: Link) -> Self

Converts to this type from the input type.
Source§

impl From<Link> for ItalicChild

Source§

fn from(value: Link) -> Self

Converts to this type from the input type.
Source§

impl From<Link> for KeyboardInputChild

Source§

fn from(value: Link) -> Self

Converts to this type from the input type.
Source§

impl From<Link> for LabelChild

Source§

fn from(value: Link) -> Self

Converts to this type from the input type.
Source§

impl From<Link> for LegendChild

Source§

fn from(value: Link) -> Self

Converts to this type from the input type.
Source§

fn from(sys: Link) -> Self

Converts to this type from the input type.
Source§

impl From<Link> for ListItemChild

Source§

fn from(value: Link) -> Self

Converts to this type from the input type.
Source§

impl From<Link> for MainChild

Source§

fn from(value: Link) -> Self

Converts to this type from the input type.
Source§

impl From<Link> for MarkTextChild

Source§

fn from(value: Link) -> Self

Converts to this type from the input type.
Source§

impl From<Link> for MeterChild

Source§

fn from(value: Link) -> Self

Converts to this type from the input type.
Source§

impl From<Link> for NavigationChild

Source§

fn from(value: Link) -> Self

Converts to this type from the input type.
Source§

impl From<Link> for NoScriptChild

Source§

fn from(value: Link) -> Self

Converts to this type from the input type.
Source§

impl From<Link> for ObjectChild

Source§

fn from(value: Link) -> Self

Converts to this type from the input type.
Source§

impl From<Link> for OutputChild

Source§

fn from(value: Link) -> Self

Converts to this type from the input type.
Source§

impl From<Link> for ParagraphChild

Source§

fn from(value: Link) -> Self

Converts to this type from the input type.
Source§

impl From<Link> for PreformattedTextChild

Source§

fn from(value: Link) -> Self

Converts to this type from the input type.
Source§

impl From<Link> for ProgressChild

Source§

fn from(value: Link) -> Self

Converts to this type from the input type.
Source§

impl From<Link> for QuotationChild

Source§

fn from(value: Link) -> Self

Converts to this type from the input type.
Source§

impl From<Link> for RubyTextChild

Source§

fn from(value: Link) -> Self

Converts to this type from the input type.
Source§

impl From<Link> for SampleOutputChild

Source§

fn from(value: Link) -> Self

Converts to this type from the input type.
Source§

impl From<Link> for SearchChild

Source§

fn from(value: Link) -> Self

Converts to this type from the input type.
Source§

impl From<Link> for SectionChild

Source§

fn from(value: Link) -> Self

Converts to this type from the input type.
Source§

impl From<Link> for SideCommentChild

Source§

fn from(value: Link) -> Self

Converts to this type from the input type.
Source§

impl From<Link> for SlotChild

Source§

fn from(value: Link) -> Self

Converts to this type from the input type.
Source§

impl From<Link> for SpanChild

Source§

fn from(value: Link) -> Self

Converts to this type from the input type.
Source§

impl From<Link> for StrikeThroughChild

Source§

fn from(value: Link) -> Self

Converts to this type from the input type.
Source§

impl From<Link> for StrongChild

Source§

fn from(value: Link) -> Self

Converts to this type from the input type.
Source§

impl From<Link> for SubScriptChild

Source§

fn from(value: Link) -> Self

Converts to this type from the input type.
Source§

impl From<Link> for SummaryChild

Source§

fn from(value: Link) -> Self

Converts to this type from the input type.
Source§

impl From<Link> for SuperScriptChild

Source§

fn from(value: Link) -> Self

Converts to this type from the input type.
Source§

impl From<Link> for TableCellChild

Source§

fn from(value: Link) -> Self

Converts to this type from the input type.
Source§

impl From<Link> for TableHeaderChild

Source§

fn from(value: Link) -> Self

Converts to this type from the input type.
Source§

impl From<Link> for TimeChild

Source§

fn from(value: Link) -> Self

Converts to this type from the input type.
Source§

impl From<Link> for UnderlineChild

Source§

fn from(value: Link) -> Self

Converts to this type from the input type.
Source§

impl From<Link> for VariableChild

Source§

fn from(value: Link) -> Self

Converts to this type from the input type.
Source§

impl From<Link> for VideoChild

Source§

fn from(value: Link) -> Self

Converts to this type from the input type.
Source§

fn into(self) -> Link

Converts this type into the (usually inferred) input type.
Source§

fn eq(&self, other: &Link) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

fn render(&self, f: &mut Formatter<'_>, depth: usize) -> Result

Render an element with a given depth argument.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.