[][src]Struct moxie_dom::elements::media::AreaBuilder

#[must_use = "needs to be built"]pub struct AreaBuilder { /* fields omitted */ }

The HTML <area> element defines a hot-spot region on an image, and optionally associates it with a hypertext link. This element is used only within a <map> element.

A type for initializing the element's attributes before calling build.

Implementations

impl AreaBuilder[src]

pub fn build(self) -> Area[src]

Initialize the element with all of the attributes so far.

impl AreaBuilder[src]

pub fn alt(self, to_set: impl ToString) -> Self[src]

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.

pub fn coords(self, to_set: impl ToString) -> Self[src]

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.

pub fn download(self, to_set: bool) -> Self[src]

This attribute, if present, indicates that the author intends the hyperlink to be used for downloading a resource. See for a full description of the download attribute.

pub fn href(self, to_set: impl ToString) -> Self[src]

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.

pub fn hreflang(self, to_set: impl ToString) -> Self[src]

Indicates the language of the linked resource. Allowed values are determined by BCP47. Use this attribute only if the href attribute is present.

pub fn ping(self, to_set: impl ToString) -> Self[src]

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.

pub fn rel(self, to_set: impl ToString) -> Self[src]

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.

pub fn target(self, to_set: impl ToString) -> Self[src]

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.

Trait Implementations

impl Element for AreaBuilder[src]

impl<E> EventTarget<E> for AreaBuilder where
    E: GlobalEvent
[src]

impl GlobalEventHandler for AreaBuilder[src]

impl HtmlElement for AreaBuilder[src]

impl Node for AreaBuilder[src]

Auto Trait Implementations

impl !RefUnwindSafe for AreaBuilder

impl !Send for AreaBuilder

impl !Sync for AreaBuilder

impl Unpin for AreaBuilder

impl !UnwindSafe for AreaBuilder

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<N> Child for N where
    N: Node
[src]

impl<T> Downcast for T where
    T: Any

impl<T> Erased for T

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.