AnchorBuilder

Struct AnchorBuilder 

Source
pub struct AnchorBuilder<'f1, S: State = Empty> { /* private fields */ }
Expand description

Use builder syntax to set the inputs and finish with build().

Implementations§

Source§

impl<'f1, S: State> AnchorBuilder<'f1, S>

Source

pub fn build(self, options: Option<&'f1 Options>) -> Anchor
where S: IsComplete,

Finishes building and performs the requested action.

Source

pub fn children( self, value: Vec<HtmlDomNode>, ) -> AnchorBuilder<'f1, SetChildren<S>>
where S::Children: IsUnset,

Optional (Some / Option setters).

Child nodes contained within this anchor

Source

pub fn maybe_children( self, value: Option<Vec<HtmlDomNode>>, ) -> AnchorBuilder<'f1, SetChildren<S>>
where S::Children: IsUnset,

Optional (Some / Option setters).

Child nodes contained within this anchor

Source

pub fn attributes( self, value: KeyMap<String, String>, ) -> AnchorBuilder<'f1, SetAttributes<S>>
where S::Attributes: IsUnset,

Optional (Some / Option setters).

HTML attributes for this anchor element

Source

pub fn maybe_attributes( self, value: Option<KeyMap<String, String>>, ) -> AnchorBuilder<'f1, SetAttributes<S>>
where S::Attributes: IsUnset,

Optional (Some / Option setters).

HTML attributes for this anchor element

Source

pub fn classes(self, value: ClassList) -> AnchorBuilder<'f1, SetClasses<S>>
where S::Classes: IsUnset,

Optional (Some / Option setters).

Classes applied to this anchor

Source

pub fn maybe_classes( self, value: Option<ClassList>, ) -> AnchorBuilder<'f1, SetClasses<S>>
where S::Classes: IsUnset,

Optional (Some / Option setters).

Classes applied to this anchor

Source

pub fn height(self, value: f64) -> AnchorBuilder<'f1, SetHeight<S>>
where S::Height: IsUnset,

Optional (Some / Option setters).

Height of this anchor element

Source

pub fn maybe_height( self, value: Option<f64>, ) -> AnchorBuilder<'f1, SetHeight<S>>
where S::Height: IsUnset,

Optional (Some / Option setters).

Height of this anchor element

Source

pub fn depth(self, value: f64) -> AnchorBuilder<'f1, SetDepth<S>>
where S::Depth: IsUnset,

Optional (Some / Option setters).

Depth of this anchor element

Source

pub fn maybe_depth(self, value: Option<f64>) -> AnchorBuilder<'f1, SetDepth<S>>
where S::Depth: IsUnset,

Optional (Some / Option setters).

Depth of this anchor element

Source

pub fn max_font_size(self, value: f64) -> AnchorBuilder<'f1, SetMaxFontSize<S>>
where S::MaxFontSize: IsUnset,

Optional (Some / Option setters).

Maximum font size used in this anchor

Source

pub fn maybe_max_font_size( self, value: Option<f64>, ) -> AnchorBuilder<'f1, SetMaxFontSize<S>>
where S::MaxFontSize: IsUnset,

Optional (Some / Option setters).

Maximum font size used in this anchor

Source

pub fn style(self, value: CssStyle) -> AnchorBuilder<'f1, SetStyle<S>>
where S::Style: IsUnset,

Optional (Some / Option setters).

Inline CSS style object

Source

pub fn maybe_style( self, value: Option<CssStyle>, ) -> AnchorBuilder<'f1, SetStyle<S>>
where S::Style: IsUnset,

Optional (Some / Option setters).

Inline CSS style object

Auto Trait Implementations§

§

impl<'f1, S> Freeze for AnchorBuilder<'f1, S>

§

impl<'f1, S> RefUnwindSafe for AnchorBuilder<'f1, S>

§

impl<'f1, S> Send for AnchorBuilder<'f1, S>

§

impl<'f1, S> Sync for AnchorBuilder<'f1, S>

§

impl<'f1, S> Unpin for AnchorBuilder<'f1, S>

§

impl<'f1, S> UnwindSafe for AnchorBuilder<'f1, S>

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.