pub struct AreaBuilder(/* private fields */);
Implementations§
Source§impl AreaBuilder
impl AreaBuilder
pub fn id(self, value: impl AttributeValue<String>) -> Self
pub fn class(self, value: impl AttributeValue<String>) -> Self
Sourcepub fn alt(self, value: impl AttributeValue<String>) -> Self
pub fn alt(self, value: impl AttributeValue<String>) -> Self
A text string alternative to display on browsers that do not display images. The text should be phrased so that it presents the user with the same kind of choice as the image would offer when displayed without the alternative text. This attribute is required only if the href attribute is used.
Sourcepub fn coords(self, value: impl AttributeValue<String>) -> Self
pub fn coords(self, value: impl AttributeValue<String>) -> Self
A set of values specifying the coordinates of the hot-spot region. The number and meaning of the values depend upon the value specified for the shape attribute.
- rect or rectangle: the coords value is two x,y pairs: left, top, right, bottom.
- circle: the value is x,y,r where x,y is a pair specifying the center of the circle and r is a value for the radius.
- poly or polygon: the value is a set of x,y pairs for each point in the polygon: x1,y1,x2,y2,x3,y3, and so on.
The values are numbers of CSS pixels.
Sourcepub fn download(self, value: impl AttributeValue<bool>) -> Self
pub fn download(self, value: impl AttributeValue<bool>) -> Self
This attribute, if present, indicates that the author intends the hyperlink to be used
for downloading a resource. See <a>
for a full description of the download attribute.
Sourcepub fn href(self, value: impl AttributeValue<String>) -> Self
pub fn href(self, value: impl AttributeValue<String>) -> Self
The hyperlink target for the area. Its value is a valid URL. This attribute may be omitted; if so, the area element does not represent a hyperlink.
Sourcepub fn hreflang(self, value: impl AttributeValue<String>) -> Self
pub fn hreflang(self, value: impl AttributeValue<String>) -> Self
Indicates the language of the linked resource. Allowed values are determined by BCP47. Use this attribute only if the href attribute is present.
Sourcepub fn ping(self, value: impl AttributeValue<String>) -> Self
pub fn ping(self, value: impl AttributeValue<String>) -> Self
Contains a space-separated list of URLs to which, when the hyperlink is followed, POST requests with the body PING will be sent by the browser (in the background). Typically used for tracking.
Sourcepub fn rel(self, value: impl AttributeValue<String>) -> Self
pub fn rel(self, value: impl AttributeValue<String>) -> Self
For anchors containing the href attribute, this attribute specifies the relationship of the target object to the link object. The value is a space-separated list of link types values. The values and their semantics will be registered by some authority that might have meaning to the document author. The default relationship, if no other is given, is void. Use this attribute only if the href attribute is present.
Sourcepub fn target(self, value: impl AttributeValue<String>) -> Self
pub fn target(self, value: impl AttributeValue<String>) -> Self
This attribute specifies where to display the linked resource. It is a name of, or keyword for, a browsing context (for example, tab, window, or inline frame). The following keywords have special meanings:
- _self: Load the response into the same browsing context as the current one. This value is the default if the attribute is not specified.
- _blank: Load the response into a new unnamed browsing context.
- _parent: Load the response into the parent browsing context of the current one. If there is no parent, this option behaves the same way as _self.
- _top: Load the response into the top-level browsing context (that is, the browsing context that is an ancestor of the current one, and has no parent). If there is no parent, this option behaves the same way as _self.
Use this attribute only if the href
attribute is present.