Struct AreaBuilder

Source
pub struct AreaBuilder(/* private fields */);

Implementations§

Source§

impl AreaBuilder

Source

pub fn id(self, value: impl AttributeValue<String>) -> Self

Source

pub fn class(self, value: impl AttributeValue<String>) -> Self

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source§

impl AreaBuilder

Source

pub fn on_blur( self, f: impl 'static + FnMut(FocusEvent, HtmlAreaElement), ) -> Self

Source

pub fn on_click( self, f: impl 'static + FnMut(MouseEvent, HtmlAreaElement), ) -> Self

Source

pub fn on_change(self, f: impl 'static + FnMut(Event, HtmlAreaElement)) -> Self

Source

pub fn on_dblclick( self, f: impl 'static + FnMut(MouseEvent, HtmlAreaElement), ) -> Self

Source

pub fn on_focusout( self, f: impl 'static + FnMut(FocusEvent, HtmlAreaElement), ) -> Self

Source

pub fn on_input( self, f: impl 'static + FnMut(InputEvent, HtmlAreaElement), ) -> Self

Source

pub fn on_keydown( self, f: impl 'static + FnMut(KeyboardEvent, HtmlAreaElement), ) -> Self

Source

pub fn on_keyup( self, f: impl 'static + FnMut(KeyboardEvent, HtmlAreaElement), ) -> Self

Source

pub fn effect(self, f: impl Effect<HtmlAreaElement>) -> Self

Trait Implementations§

Source§

impl Builder for AreaBuilder

Source§

impl DomElement for AreaBuilder

Source§

impl From<AreaBuilder> for Element

Source§

fn from(builder: AreaBuilder) -> Self

Converts to this type from the input type.
Source§

impl From<AreaBuilder> for ElementBuilder

Source§

fn from(builder: AreaBuilder) -> Self

Converts to this type from the input type.

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> 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, 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.