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§
fn href(self, href: impl Into<Cow<'static, str>>) -> Self::Output<Href>
Sourcefn cross_origin(self, cross_origin: CrossOrigin) -> Self::Output<CrossOrigin>
fn cross_origin(self, cross_origin: CrossOrigin) -> Self::Output<CrossOrigin>
Handling of crossorigin requests.
Sourcefn rel(self, rel: impl Into<SpaceSeparated<Rel>>) -> Self::Output<RelList>
fn rel(self, rel: impl Into<SpaceSeparated<Rel>>) -> Self::Output<RelList>
Relationship between the document and the linked resource.
fn as(self, as: As) -> Self::Output<As>
Sourcefn media(self, media: impl Into<Cow<'static, str>>) -> Self::Output<Media>
fn media(self, media: impl Into<Cow<'static, str>>) -> Self::Output<Media>
The media the resource applies to.
Sourcefn integrity(
self,
integrity: impl Into<Cow<'static, str>>,
) -> Self::Output<Integrity>
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.
Sourcefn hreflang(
self,
hreflang: impl Into<Cow<'static, str>>,
) -> Self::Output<Hreflang>
fn hreflang( self, hreflang: impl Into<Cow<'static, str>>, ) -> Self::Output<Hreflang>
Hint the language of the linked resource.
Sourcefn type(self, type: impl Into<Cow<'static, str>>) -> Self::Output<Type>
fn type(self, type: impl Into<Cow<'static, str>>) -> Self::Output<Type>
Hint for the type of the referenced resource.
Sourcefn sizes(self, sizes: impl Into<Cow<'static, str>>) -> Self::Output<Sizes>
fn sizes(self, sizes: impl Into<Cow<'static, str>>) -> Self::Output<Sizes>
Sizes of the icons (Rel::Icon).
Sourcefn image_srcset(
self,
image_srcset: impl Into<Cow<'static, str>>,
) -> Self::Output<ImageSrcset>
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.
Sourcefn image_sizes(
self,
image_sizes: impl Into<Cow<'static, str>>,
) -> Self::Output<ImageSizes>
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.
Sourcefn referrer_policy(
self,
referrer_policy: ReferrerPolicy,
) -> Self::Output<ReferrerPolicy>
fn referrer_policy( self, referrer_policy: ReferrerPolicy, ) -> Self::Output<ReferrerPolicy>
How much referrer information to send.
Sourcefn blocking(self) -> Self::Output<Blocking>
fn blocking(self) -> Self::Output<Blocking>
Indicate that the element is potentially render blocking.
Sourcefn with_blocking(self, blocking: bool) -> Self::Output<Blocking>
fn with_blocking(self, blocking: bool) -> Self::Output<Blocking>
Indicate that the element is potentially render blocking.
Sourcefn with_disabled(self, disabled: bool) -> Self::Output<Disabled>
fn with_disabled(self, disabled: bool) -> Self::Output<Disabled>
Whether the link is disabled.
Sourcefn fetch_priority(
self,
fetch_priority: FetchPriority,
) -> Self::Output<FetchPriority>
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.