Link

Trait Link 

Source
pub trait Link: WithAttribute {
Show 18 methods // Provided methods fn href(self, href: impl Into<Cow<'static, str>>) -> Self::Output<Href> { ... } fn cross_origin( self, cross_origin: CrossOrigin, ) -> Self::Output<CrossOrigin> { ... } fn rel(self, rel: impl Into<SpaceSeparated<Rel>>) -> Self::Output<RelList> { ... } fn append_rel(self, rel: Rel) -> Self::Output<RelList> { ... } fn as(self, as: As) -> Self::Output<As> { ... } fn media(self, media: impl Into<Cow<'static, str>>) -> Self::Output<Media> { ... } fn integrity( self, integrity: impl Into<Cow<'static, str>>, ) -> Self::Output<Integrity> { ... } fn hreflang( self, hreflang: impl Into<Cow<'static, str>>, ) -> Self::Output<Hreflang> { ... } fn type(self, type: impl Into<Cow<'static, str>>) -> Self::Output<Type> { ... } fn sizes(self, sizes: impl Into<Cow<'static, str>>) -> Self::Output<Sizes> { ... } fn image_srcset( self, image_srcset: impl Into<Cow<'static, str>>, ) -> Self::Output<ImageSrcset> { ... } fn image_sizes( self, image_sizes: impl Into<Cow<'static, str>>, ) -> Self::Output<ImageSizes> { ... } fn referrer_policy( self, referrer_policy: ReferrerPolicy, ) -> Self::Output<ReferrerPolicy> { ... } fn blocking(self) -> Self::Output<Blocking> { ... } fn with_blocking(self, blocking: bool) -> Self::Output<Blocking> { ... } fn disabled(self) -> Self::Output<Disabled> { ... } fn with_disabled(self, disabled: bool) -> Self::Output<Disabled> { ... } fn fetch_priority( self, fetch_priority: FetchPriority, ) -> Self::Output<FetchPriority> { ... }
}
Expand description

A link element allows to link to other resources.

Provided Methods§

Source

fn href(self, href: impl Into<Cow<'static, str>>) -> Self::Output<Href>

Source

fn cross_origin(self, cross_origin: CrossOrigin) -> Self::Output<CrossOrigin>

Handling of crossorigin requests.

Source

fn rel(self, rel: impl Into<SpaceSeparated<Rel>>) -> Self::Output<RelList>

Relationship between the document and the linked resource.

Source

fn append_rel(self, rel: Rel) -> Self::Output<RelList>

Appends a Rel to the link.

Source

fn as(self, as: As) -> Self::Output<As>

Source

fn media(self, media: impl Into<Cow<'static, str>>) -> Self::Output<Media>

The media the resource applies to.

Source

fn integrity( self, integrity: impl Into<Cow<'static, str>>, ) -> Self::Output<Integrity>

Integrity metadata used in Subresource Integrity checks. Must only be specified on links with Rel::StyleSheet, Rel::Preload, or Rel::Modulepreload.

Source

fn hreflang( self, hreflang: impl Into<Cow<'static, str>>, ) -> Self::Output<Hreflang>

Hint the language of the linked resource.

Source

fn type(self, type: impl Into<Cow<'static, str>>) -> Self::Output<Type>

Hint for the type of the referenced resource.

Source

fn sizes(self, sizes: impl Into<Cow<'static, str>>) -> Self::Output<Sizes>

Sizes of the icons (Rel::Icon).

Source

fn image_srcset( self, image_srcset: impl Into<Cow<'static, str>>, ) -> Self::Output<ImageSrcset>

Images to use in different situations. For Rel::Preload and As::Image only.

Source

fn image_sizes( self, image_sizes: impl Into<Cow<'static, str>>, ) -> Self::Output<ImageSizes>

Image sizes for different page layouts. For Rel::Preload and As::Image only.

Source

fn referrer_policy( self, referrer_policy: ReferrerPolicy, ) -> Self::Output<ReferrerPolicy>

How much referrer information to send.

Source

fn blocking(self) -> Self::Output<Blocking>

Indicate that the element is potentially render blocking.

Source

fn with_blocking(self, blocking: bool) -> Self::Output<Blocking>

Indicate that the element is potentially render blocking.

Source

fn disabled(self) -> Self::Output<Disabled>

Whether the link is disabled.

Source

fn with_disabled(self, disabled: bool) -> Self::Output<Disabled>

Whether the link is disabled.

Source

fn fetch_priority( self, fetch_priority: FetchPriority, ) -> Self::Output<FetchPriority>

Sets the priority for fetches initiated by the element.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§