Struct dominator::DomBuilder
source · [−]pub struct DomBuilder<A> { /* private fields */ }
Implementations
sourceimpl<A> DomBuilder<A>where
A: JsCast,
impl<A> DomBuilder<A>where
A: JsCast,
sourceimpl<A> DomBuilder<A>
impl<A> DomBuilder<A>
pub fn new(value: A) -> Self
pub fn global_event_with_options<T, F>(
self,
options: &EventOptions,
listener: F
) -> Selfwhere
T: StaticEvent,
F: FnMut(T) + 'static,
pub fn global_event<T, F>(self, listener: F) -> Selfwhere
T: StaticEvent,
F: FnMut(T) + 'static,
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
pub fn future<F>(self, future: F) -> Selfwhere
F: Future<Output = ()> + 'static,
pub fn apply<F>(self, f: F) -> Selfwhere
F: FnOnce(Self) -> Self,
pub fn apply_if<F>(self, test: bool, f: F) -> Selfwhere
F: FnOnce(Self) -> Self,
sourceimpl<A> DomBuilder<A>where
A: Clone,
impl<A> DomBuilder<A>where
A: Clone,
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
pub fn before_inserted<F>(self, f: F) -> Selfwhere
F: FnOnce(A),
👎Deprecated since 0.5.20: Use the with_node macro instead
sourceimpl<A> DomBuilder<A>where
A: Clone + 'static,
impl<A> DomBuilder<A>where
A: Clone + 'static,
pub fn after_inserted<F>(self, f: F) -> Selfwhere
F: FnOnce(A) + 'static,
pub fn after_removed<F>(self, f: F) -> Selfwhere
F: FnOnce(A) + 'static,
sourceimpl<A> DomBuilder<A>where
A: AsRef<JsValue>,
impl<A> DomBuilder<A>where
A: AsRef<JsValue>,
sourceimpl<A> DomBuilder<A>where
A: AsRef<JsValue>,
impl<A> DomBuilder<A>where
A: AsRef<JsValue>,
pub fn prop_signal<B, C, D>(self, name: B, value: D) -> Selfwhere
B: MultiStr + 'static,
C: Into<JsValue>,
D: Signal<Item = C> + 'static,
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 insteadsourceimpl<A> DomBuilder<A>where
A: AsRef<EventTarget>,
impl<A> DomBuilder<A>where
A: AsRef<EventTarget>,
pub fn event_with_options<T, F>(self, options: &EventOptions, listener: F) -> Selfwhere
T: StaticEvent,
F: FnMut(T) + 'static,
pub fn event<T, F>(self, listener: F) -> Selfwhere
T: StaticEvent,
F: FnMut(T) + 'static,
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
sourceimpl<A> DomBuilder<A>where
A: AsRef<Node>,
impl<A> DomBuilder<A>where
A: AsRef<Node>,
sourcepub fn fragment<F>(self, fragment: &F) -> Selfwhere
F: Fragment,
pub fn fragment<F>(self, fragment: &F) -> Selfwhere
F: Fragment,
Inserts the Fragment
into this DomBuilder
.
See the documentation for fragment
for more details.
pub fn text(self, value: &str) -> Self
pub fn text_signal<B, C>(self, value: C) -> Selfwhere
B: AsStr,
C: Signal<Item = B> + 'static,
pub fn child<B: BorrowMut<Dom>>(self, child: B) -> Self
pub fn child_signal<B>(self, child: B) -> Selfwhere
B: Signal<Item = Option<Dom>> + 'static,
pub fn children<B: BorrowMut<Dom>, C: IntoIterator<Item = B>>(
self,
children: C
) -> Self
pub fn children_signal_vec<B>(self, children: B) -> Selfwhere
B: SignalVec<Item = Dom> + 'static,
sourceimpl<A> DomBuilder<A>where
A: AsRef<Element>,
impl<A> DomBuilder<A>where
A: AsRef<Element>,
pub fn attr<B>(self, name: B, value: &str) -> Selfwhere
B: MultiStr,
pub fn attribute<B>(self, name: B, value: &str) -> Selfwhere
B: MultiStr,
👎Deprecated since 0.5.24: Use the
attr
method insteadpub fn attr_ns<B>(self, namespace: &str, name: B, value: &str) -> Selfwhere
B: MultiStr,
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 insteadpub fn class<B>(self, name: B) -> Selfwhere
B: MultiStr,
pub fn visible(self, value: bool) -> Self
sourceimpl<A> DomBuilder<A>where
A: AsRef<Element>,
impl<A> DomBuilder<A>where
A: AsRef<Element>,
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,
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 insteadpub 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,
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 insteadpub fn class_signal<B, C>(self, name: B, value: C) -> Selfwhere
B: MultiStr + 'static,
C: Signal<Item = bool> + 'static,
pub fn visible_signal<B>(self, value: B) -> Selfwhere
B: Signal<Item = bool> + 'static,
pub fn scroll_left_signal<B>(self, signal: B) -> Selfwhere
B: Signal<Item = Option<i32>> + 'static,
pub fn scroll_top_signal<B>(self, signal: B) -> Selfwhere
B: Signal<Item = Option<i32>> + 'static,
sourceimpl<A> DomBuilder<A>where
A: AsRef<HtmlElement>,
impl<A> DomBuilder<A>where
A: AsRef<HtmlElement>,
sourceimpl<A> DomBuilder<A>where
A: AsRef<HtmlElement>,
impl<A> DomBuilder<A>where
A: AsRef<HtmlElement>,
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,
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,
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,
pub fn focused(self, value: bool) -> Self
pub fn focused_signal<B>(self, value: B) -> Selfwhere
B: Signal<Item = bool> + 'static,
Trait Implementations
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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more