Skip to main content

LinkRelation

Enum LinkRelation 

Source
#[non_exhaustive]
pub enum LinkRelation {
Show 133 variants About, Acl, Alternate, AmpHtml, ApiCatalog, Appendix, AppleTouchIcon, AppleTouchStartupImage, Archives, Author, BlockedBy, Bookmark, C2paManifest, Canonical, Chapter, CiteAs, Collection, CompressionDictionary, Contents, ConvertedFrom, Copyright, CreateForm, Current, Deprecation, DescribedBy, Describes, Disclosure, DnsPrefetch, Duplicate, Edit, EditForm, EditMedia, Enclosure, External, First, Geofeed, Glossary, Help, Hosts, Hub, IceServer, Icon, Index, IntervalAfter, IntervalBefore, IntervalContains, IntervalDisjoint, IntervalDuring, IntervalEquals, IntervalFinishedBy, IntervalFinishes, IntervalIn, IntervalMeets, IntervalMetBy, IntervalOverlappedBy, IntervalOverlaps, IntervalStartedBy, IntervalStarts, Item, Last, LatestVersion, License, Linkset, Lrdd, Manifest, MaskIcon, Me, MediaFeed, Memento, Micropub, ModulePreload, Monitor, MonitorGroup, Next, NextArchive, NoFollow, NoOpener, NoReferrer, Opener, OpenId2LocalId, OpenId2Provider, Original, P3pv1, Payment, Pingback, Preconnect, PredecessorVersion, Prefetch, Preload, Prerender, Prev, Preview, Previous, PrevArchive, PrivacyPolicy, Profile, Publication, RdapActive, RdapBottom, RdapDown, RdapTop, RdapUp, Related, Replies, Restconf, RuleInput, Search, Section, Self_, Service, ServiceDesc, ServiceDoc, ServiceMeta, SipTrunkingCapability, Sponsored, Start, Status, Stylesheet, Subsection, SuccessorVersion, Sunset, Tag, TermsOfService, TimeGate, TimeMap, Type, Ugc, Up, VersionHistory, Via, Webmention, WorkingCopy, WorkingCopyOf,
}
Expand description

A link relation from the IANA Link Relations Registry.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

About

Refers to a resource that is the subject of the link’s context.

Source: RFC 6903, Section 2.

§

Acl

Asserts that the link target provides an access control description.

Source: Web Access Control.

§

Alternate

Refers to a substitute for this context.

Source: HTML.

§

AmpHtml

Refers to an AMP HTML version of the context.

Source: AMP HTML.

§

ApiCatalog

Refers to a list of published APIs.

Source: RFC 9727.

§

Appendix

Refers to an appendix in a collection of resources.

Source: HTML 4.01.

§

AppleTouchIcon

Refers to an icon for the context (synonym for icon).

Source: Apple Web Application Configuration.

§

AppleTouchStartupImage

Refers to a launch screen for the context.

Source: Apple Web Application Configuration.

§

Archives

Refers to a collection of records, documents, or other materials.

Source: HTML 5.

§

Author

Refers to the context’s author.

Source: HTML.

§

BlockedBy

Identifies the entity that blocks access to a resource.

Source: RFC 7725.

§

Bookmark

Gives a permanent link to use for bookmarking purposes.

Source: HTML.

§

C2paManifest

Links to a C2PA Manifest associated with the link context.

Source: C2PA Technical Specification.

§

Canonical

Designates the preferred version of a resource.

Source: RFC 6596.

§

Chapter

Refers to a chapter in a collection of resources.

Source: HTML 4.01.

§

CiteAs

Indicates the preferred URI for permanent citation.

Source: RFC 8574.

§

Collection

Represents a collection resource for the context.

Source: RFC 6573.

§

CompressionDictionary

Refers to a compression dictionary for content encoding.

Source: RFC 9842, Section 3.

§

Contents

Refers to a table of contents.

Source: HTML 4.01.

§

ConvertedFrom

The document was later converted from the linked document.

Source: RFC 7991.

§

Copyright

Refers to a copyright statement for the context.

Source: HTML 4.01.

§

CreateForm

Refers to a resource from which a submission form can be obtained.

Source: RFC 6861.

§

Current

Refers to the most recent item(s) in a collection.

Source: RFC 5005.

§

Deprecation

Links to documentation about deprecation of the context.

Source: RFC 9745, Section 3.

§

DescribedBy

Refers to a resource providing information about the context.

Source: Protocol for Web Description Resources (POWDER).

§

Describes

The relationship asserts that resource A describes resource B.

Source: RFC 6892.

§

Disclosure

Refers to a list of patent disclosures.

Source: RFC 6579.

§

DnsPrefetch

Indicates an origin whose resources should be resolved early.

Source: HTML.

§

Duplicate

Refers to a resource with byte-for-byte identical representation.

Source: RFC 6249.

§

Edit

Refers to a resource that can be used to edit the context.

Source: RFC 5023.

§

EditForm

Refers to a submission form for editing the context.

Source: RFC 6861.

§

EditMedia

Refers to a resource for editing media associated with the context.

Source: RFC 5023.

§

Enclosure

Identifies a potentially large related resource.

Source: RFC 4287.

§

External

Indicates a resource not part of the same site as the context.

Source: HTML.

§

First

Refers to the furthest preceding resource in a series.

Source: RFC 8288.

§

Geofeed

Refers to a resource providing IP geolocation information.

Source: RFC 9877.

§

Glossary

Refers to a glossary of terms.

Source: HTML 4.01.

§

Help

Refers to context-sensitive help.

Source: HTML.

§

Hosts

Refers to a resource hosted by the server.

Source: RFC 6690.

§

Hub

Refers to a hub for subscribing to updates.

Source: WebSub.

§

IceServer

Refers to STUN/TURN server information for ICE connections.

Source: RFC 9725.

§

Icon

Refers to an icon representing the context.

Source: HTML.

§

Index

Refers to an index for the context.

Source: HTML 4.01.

§

IntervalAfter

Refers to a time interval ending before the context interval.

Source: Time Ontology in OWL, Section 4.2.21.

§

IntervalBefore

Refers to a time interval starting after the context interval.

Source: Time Ontology in OWL, Section 4.2.22.

§

IntervalContains

Refers to a time interval contained within the context interval.

Source: Time Ontology in OWL, Section 4.2.23.

§

IntervalDisjoint

Refers to a time interval disjoint from the context interval.

Source: Time Ontology in OWL, Section 4.2.24.

§

IntervalDuring

Refers to a time interval containing the context interval.

Source: Time Ontology in OWL, Section 4.2.25.

§

IntervalEquals

Refers to a time interval matching the context interval.

Source: Time Ontology in OWL, Section 4.2.26.

§

IntervalFinishedBy

Refers to a time interval with matching end to the context.

Source: Time Ontology in OWL, Section 4.2.27.

§

IntervalFinishes

Refers to a time interval finishing at the context end.

Source: Time Ontology in OWL, Section 4.2.28.

§

IntervalIn

Refers to a time interval encompassing the context interval.

Source: Time Ontology in OWL, Section 4.2.29.

§

IntervalMeets

Refers to a time interval starting at the context end.

Source: Time Ontology in OWL, Section 4.2.30.

§

IntervalMetBy

Refers to a time interval ending at the context start.

Source: Time Ontology in OWL, Section 4.2.31.

§

IntervalOverlappedBy

Refers to a time interval overlapping from before context start.

Source: Time Ontology in OWL, Section 4.2.32.

§

IntervalOverlaps

Refers to a time interval overlapping past the context end.

Source: Time Ontology in OWL, Section 4.2.33.

§

IntervalStartedBy

Refers to a time interval with matching start to the context.

Source: Time Ontology in OWL, Section 4.2.34.

§

IntervalStarts

Refers to a time interval starting at the context start.

Source: Time Ontology in OWL, Section 4.2.35.

§

Item

Refers to a member of a collection.

Source: RFC 6573.

§

Last

Refers to the furthest following resource in a series.

Source: RFC 8288.

§

LatestVersion

Points to a resource with the latest/current version.

Source: RFC 5829.

§

License

Refers to a license associated with the context.

Source: RFC 4946.

§

Linkset

Refers to a set of links with the context as a participant.

Source: RFC 9264.

§

Lrdd

Refers to further information as a Link-based Resource Descriptor.

Source: RFC 6415.

§

Manifest

Links to a manifest file for the context.

Source: Web App Manifest.

§

MaskIcon

Refers to a mask applicable to the icon.

Source: Creating Pinned Tab Icons (Apple).

§

Me

Refers to a resource about the author of the link’s context.

Source: Microformats rel=me.

§

MediaFeed

Refers to a feed of personalized media recommendations.

Source: Media Feeds.

§

Memento

Indicates a fixed resource representing a prior state.

Source: RFC 7089.

§

Micropub

Refers to the context’s Micropub endpoint.

Source: Micropub.

§

ModulePreload

Refers to a module for preemptive fetching.

Source: HTML.

§

Monitor

Refers to a resource for monitoring changes.

Source: RFC 5989.

§

MonitorGroup

Refers to a resource for monitoring a group of resources.

Source: RFC 5989.

§

Next

Refers to the next resource in a series.

Source: HTML.

§

NextArchive

Refers to the immediately following archive resource.

Source: RFC 5005.

§

NoFollow

Indicates the author does not endorse the link target.

Source: HTML.

§

NoOpener

Indicates the new context should not be an auxiliary browsing context.

Source: HTML.

§

NoReferrer

Indicates no referrer information should be leaked.

Source: HTML.

§

Opener

Indicates the new context is an auxiliary browsing context.

Source: HTML.

§

OpenId2LocalId

Refers to a server for OpenID Authentication identity assertion.

Source: OpenID Authentication 2.0.

§

OpenId2Provider

Refers to a server accepting OpenID Authentication protocol messages.

Source: OpenID Authentication 2.0.

§

Original

Refers to an Original Resource in a Memento context.

Source: RFC 7089.

§

P3pv1

Refers to a P3P privacy policy.

Source: The Platform for Privacy Preferences 1.0.

§

Payment

Indicates a resource where payment is accepted.

Source: RFC 8288.

§

Pingback

Refers to a Pingback resource address.

Source: Pingback 1.0.

§

Preconnect

Indicates an origin to which early connection should be made.

Source: HTML.

§

PredecessorVersion

Points to a resource with a predecessor version in history.

Source: RFC 5829.

§

Prefetch

Indicates a resource that should be fetched early.

Source: HTML.

§

Preload

Indicates a resource that should be loaded early without blocking.

Source: Preload.

§

Prerender

Indicates a resource to fetch and execute for next navigation.

Source: Resource Hints.

§

Prev

Refers to the previous resource in a series.

Source: HTML.

§

Preview

Refers to a preview of the context.

Source: RFC 6903, Section 3.

§

Previous

Refers to the previous resource in a series (synonym for prev).

Source: HTML 4.01.

§

PrevArchive

Refers to the immediately preceding archive resource.

Source: RFC 5005.

§

PrivacyPolicy

Refers to a privacy policy for the context.

Source: RFC 6903, Section 4.

§

Profile

Identifies a resource conforming to a profile.

Source: RFC 6906.

§

Publication

Links to the publication manifest with metadata.

Source: Publication Manifest.

§

RdapActive

Used in RDAP RIR search to filter for “active” objects.

Source: RFC 9910.

§

RdapBottom

Used in RDAP to refer to child objects without children.

Source: RFC 9910.

§

RdapDown

Used in RDAP to refer to a set of child objects.

Source: RFC 9910.

§

RdapTop

Used in RDAP to refer to the topmost parent in a hierarchy.

Source: RFC 9910.

§

RdapUp

Used in RDAP to refer to a parent object in a hierarchy.

Source: RFC 9910.

§

Related

Identifies a related resource.

Source: RFC 4287.

§

Replies

Identifies a resource replying to the context.

Source: RFC 4685.

§

Restconf

Identifies the root of a RESTCONF API.

Source: RFC 8040.

§

RuleInput

Refers to an input value for a rule instance.

Source: OCF Core Optional 2.2.0.

§

Search

Refers to a resource for searching the context.

Source: OpenSearch.

§

Section

Refers to a section in a collection of resources.

Source: HTML 4.01.

§

Self_

Conveys an identifier for the link’s context.

Source: RFC 4287.

Note: Named Self_ to avoid conflict with the Rust keyword.

§

Service

Indicates a URI for a service document.

Source: RFC 5023.

§

ServiceDesc

Identifies a service description for machines.

Source: RFC 8631.

§

ServiceDoc

Identifies a service documentation for humans.

Source: RFC 8631.

§

ServiceMeta

Identifies general metadata for machines.

Source: RFC 8631.

§

SipTrunkingCapability

Refers to a SIP trunking capability set document.

Source: RFC 9409.

§

Sponsored

Indicates a sponsored resource within the context.

Source: Qualify Outbound Links (Google).

§

Start

Refers to the first resource in a collection.

Source: HTML 4.01.

§

Status

Identifies a resource representing the context’s status.

Source: RFC 8631.

§

Stylesheet

Refers to a stylesheet.

Source: HTML.

§

Subsection

Refers to a subsection in a collection of resources.

Source: HTML 4.01.

§

SuccessorVersion

Points to a resource with a successor version in history.

Source: RFC 5829.

§

Sunset

Identifies a resource with retirement policy information.

Source: RFC 8594.

§

Tag

Refers to a tag applying to the document.

Source: HTML.

§

TermsOfService

Refers to terms of service for the context.

Source: RFC 6903, Section 5.

§

TimeGate

Refers to a TimeGate for an Original Resource.

Source: RFC 7089.

§

TimeMap

Refers to a TimeMap for an Original Resource.

Source: RFC 7089.

§

Type

Refers to a resource identifying the abstract semantic type.

Source: RFC 6903, Section 6.

§

Ugc

Indicates user-generated content within the context.

Source: Qualify Outbound Links (Google).

§

Up

Refers to a parent document in a hierarchy.

Source: RFC 8288.

§

VersionHistory

Points to a version history resource.

Source: RFC 5829.

§

Via

Identifies a source of information in the context.

Source: RFC 4287.

§

Webmention

Identifies a target supporting the Webmention protocol.

Source: Webmention.

§

WorkingCopy

Points to a working copy for the resource.

Source: RFC 5829.

§

WorkingCopyOf

Points to the versioned resource source of a working copy.

Source: RFC 5829.

Trait Implementations§

Source§

impl Clone for LinkRelation

Source§

fn clone(&self) -> LinkRelation

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§

impl Debug for LinkRelation

Source§

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

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

impl Display for LinkRelation

Source§

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

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

impl FromStr for LinkRelation

Source§

type Err = ParseError

The associated error which can be returned from parsing.
Source§

fn from_str(s: &str) -> Result<LinkRelation, <Self as FromStr>::Err>

Parses a string s to return a value of this type. Read more
Source§

impl Hash for LinkRelation

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Ord for LinkRelation

Source§

fn cmp(&self, other: &LinkRelation) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for LinkRelation

Source§

fn eq(&self, other: &LinkRelation) -> 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§

impl PartialOrd for LinkRelation

Source§

fn partial_cmp(&self, other: &LinkRelation) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl TryFrom<&str> for LinkRelation

Source§

type Error = ParseError

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

fn try_from(s: &str) -> Result<LinkRelation, <Self as TryFrom<&str>>::Error>

Performs the conversion.
Source§

impl Copy for LinkRelation

Source§

impl Eq for LinkRelation

Source§

impl StructuralPartialEq for LinkRelation

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.