Struct dominator::DomBuilder

source ·
pub struct DomBuilder<A> { /* private fields */ }

Implementations§

source§

impl<A> DomBuilder<A>where A: JsCast,

source

pub fn new_html(name: &str) -> Self

source

pub fn new_svg(name: &str) -> Self

source§

impl<A> DomBuilder<A>

source

pub fn new(value: A) -> Self

source

pub fn global_event_with_options<T, F>( self, options: &EventOptions, listener: F ) -> Selfwhere T: StaticEvent, F: FnMut(T) + 'static,

source

pub fn global_event<T, F>(self, listener: F) -> Selfwhere T: StaticEvent, F: FnMut(T) + 'static,

source

pub fn global_event_preventable<T, F>(self, listener: F) -> Selfwhere T: StaticEvent, F: FnMut(T) + 'static,

👎Deprecated since 0.5.21: Use global_event_with_options instead
source

pub fn future<F>(self, future: F) -> Selfwhere F: Future<Output = ()> + 'static,

source

pub fn apply<F>(self, f: F) -> Selfwhere F: FnOnce(Self) -> Self,

source

pub fn apply_if<F>(self, test: bool, f: F) -> Selfwhere F: FnOnce(Self) -> Self,

source§

impl<A> DomBuilder<A>where A: Clone,

source

pub fn with_element<B, F>(self, f: F) -> Bwhere F: FnOnce(Self, A) -> B,

👎Deprecated since 0.5.1: Use the with_node macro instead
source

pub fn before_inserted<F>(self, f: F) -> Selfwhere F: FnOnce(A),

👎Deprecated since 0.5.20: Use the with_node macro instead
source§

impl<A> DomBuilder<A>where A: Clone + 'static,

source

pub fn after_inserted<F>(self, f: F) -> Selfwhere F: FnOnce(A) + 'static,

source

pub fn after_removed<F>(self, f: F) -> Selfwhere F: FnOnce(A) + 'static,

source§

impl<A> DomBuilder<A>where A: Into<Node>,

source

pub fn into_dom(self) -> Dom

source§

impl<A> DomBuilder<A>where A: AsRef<JsValue>,

source

pub fn prop<B, C>(self, name: B, value: C) -> Selfwhere B: MultiStr, C: Into<JsValue>,

source

pub fn property<B, C>(self, name: B, value: C) -> Selfwhere B: MultiStr, C: Into<JsValue>,

👎Deprecated since 0.5.24: Use the prop method instead
source§

impl<A> DomBuilder<A>where A: AsRef<JsValue>,

source

pub fn prop_signal<B, C, D>(self, name: B, value: D) -> Selfwhere B: MultiStr + 'static, C: Into<JsValue>, D: Signal<Item = C> + 'static,

source

pub fn property_signal<B, C, D>(self, name: B, value: D) -> Selfwhere B: MultiStr + 'static, C: Into<JsValue>, D: Signal<Item = C> + 'static,

👎Deprecated since 0.5.24: Use the prop_signal method instead
source§

impl<A> DomBuilder<A>where A: AsRef<EventTarget>,

source

pub fn event_with_options<T, F>( self, options: &EventOptions, listener: F ) -> Selfwhere T: StaticEvent, F: FnMut(T) + 'static,

source

pub fn event<T, F>(self, listener: F) -> Selfwhere T: StaticEvent, F: FnMut(T) + 'static,

source

pub fn event_preventable<T, F>(self, listener: F) -> Selfwhere T: StaticEvent, F: FnMut(T) + 'static,

👎Deprecated since 0.5.21: Use event_with_options instead
source§

impl<A> DomBuilder<A>where A: AsRef<Node>,

source

pub fn fragment<F>(self, fragment: &F) -> Selfwhere F: Fragment,

Inserts the Fragment into this DomBuilder.

See the documentation for fragment! for more details.

source

pub fn text(self, value: &str) -> Self

source

pub fn text_signal<B, C>(self, value: C) -> Selfwhere B: AsStr, C: Signal<Item = B> + 'static,

source

pub fn child<B: BorrowMut<Dom>>(self, child: B) -> Self

source

pub fn child_signal<B>(self, child: B) -> Selfwhere B: Signal<Item = Option<Dom>> + 'static,

source

pub fn children<B: BorrowMut<Dom>, C: IntoIterator<Item = B>>( self, children: C ) -> Self

source

pub fn children_signal_vec<B>(self, children: B) -> Selfwhere B: SignalVec<Item = Dom> + 'static,

source§

impl<A> DomBuilder<A>where A: AsRef<Element>,

source

pub fn attr<B>(self, name: B, value: &str) -> Selfwhere B: MultiStr,

source

pub fn attribute<B>(self, name: B, value: &str) -> Selfwhere B: MultiStr,

👎Deprecated since 0.5.24: Use the attr method instead
source

pub fn attr_ns<B>(self, namespace: &str, name: B, value: &str) -> Selfwhere B: MultiStr,

source

pub fn attribute_namespace<B>( self, namespace: &str, name: B, value: &str ) -> Selfwhere B: MultiStr,

👎Deprecated since 0.5.24: Use the attr_ns method instead
source

pub fn class<B>(self, name: B) -> Selfwhere B: MultiStr,

source

pub fn visible(self, value: bool) -> Self

source§

impl<A> DomBuilder<A>where A: AsRef<Element>,

source

pub fn attr_signal<B, C, D, E>(self, name: B, value: E) -> Selfwhere B: MultiStr + 'static, C: AsStr, D: OptionStr<Output = C>, E: Signal<Item = D> + 'static,

source

pub fn attribute_signal<B, C, D, E>(self, name: B, value: E) -> Selfwhere B: MultiStr + 'static, C: AsStr, D: OptionStr<Output = C>, E: Signal<Item = D> + 'static,

👎Deprecated since 0.5.24: Use the attr_signal method instead
source

pub fn attr_ns_signal<B, C, D, E>( self, namespace: &str, name: B, value: E ) -> Selfwhere B: MultiStr + 'static, C: AsStr, D: OptionStr<Output = C>, E: Signal<Item = D> + 'static,

source

pub fn attribute_namespace_signal<B, C, D, E>( self, namespace: &str, name: B, value: E ) -> Selfwhere B: MultiStr + 'static, C: AsStr, D: OptionStr<Output = C>, E: Signal<Item = D> + 'static,

👎Deprecated since 0.5.24: Use the attr_ns_signal method instead
source

pub fn class_signal<B, C>(self, name: B, value: C) -> Selfwhere B: MultiStr + 'static, C: Signal<Item = bool> + 'static,

source

pub fn visible_signal<B>(self, value: B) -> Selfwhere B: Signal<Item = bool> + 'static,

source

pub fn scroll_left_signal<B>(self, signal: B) -> Selfwhere B: Signal<Item = Option<i32>> + 'static,

source

pub fn scroll_top_signal<B>(self, signal: B) -> Selfwhere B: Signal<Item = Option<i32>> + 'static,

source§

impl<A> DomBuilder<A>where A: AsRef<HtmlElement>,

source

pub fn style<B, C>(self, name: B, value: C) -> Selfwhere B: MultiStr, C: MultiStr,

source

pub fn style_important<B, C>(self, name: B, value: C) -> Selfwhere B: MultiStr, C: MultiStr,

source

pub fn style_unchecked<B, C>(self, name: B, value: C) -> Selfwhere B: AsStr, C: AsStr,

source§

impl<A> DomBuilder<A>where A: AsRef<HtmlElement>,

source

pub fn style_signal<B, C, D, E>(self, name: B, value: E) -> Selfwhere B: MultiStr + 'static, C: MultiStr, D: OptionStr<Output = C>, E: Signal<Item = D> + 'static,

source

pub fn style_important_signal<B, C, D, E>(self, name: B, value: E) -> Selfwhere B: MultiStr + 'static, C: MultiStr, D: OptionStr<Output = C>, E: Signal<Item = D> + 'static,

source

pub fn style_unchecked_signal<B, C, D, E>(self, name: B, value: E) -> Selfwhere B: AsStr + 'static, C: AsStr, D: OptionStr<Output = C>, E: Signal<Item = D> + 'static,

source

pub fn focused(self, value: bool) -> Self

source

pub fn focused_signal<B>(self, value: B) -> Selfwhere B: Signal<Item = bool> + 'static,

Trait Implementations§

source§

impl<A: Debug> Debug for DomBuilder<A>

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<A> !RefUnwindSafe for DomBuilder<A>

§

impl<A> !Send for DomBuilder<A>

§

impl<A> !Sync for DomBuilder<A>

§

impl<A> Unpin for DomBuilder<A>where A: Unpin,

§

impl<A> !UnwindSafe for DomBuilder<A>

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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 Twhere 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 Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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.