pub enum ElementsMaybeSignal<T, E>{
Static(Vec<Option<T>>),
Dynamic(Signal<Vec<Option<T>>>),
_Phantom(PhantomData<E>),
}
Expand description
Used as an argument type to make it easily possible to pass either
- a
web_sys
element that implementsE
(for exampleEventTarget
orElement
), - an
Option<T>
whereT
is the web_sys element, - a
Signal<T>
whereT
is the web_sys element, - a
Signal<Option<T>>
whereT
is the web_sys element, - a
NodeRef
into a function. Used for example in crate::use_event_listener
.
Variants§
Trait Implementations§
Source§impl<T, E> Clone for ElementsMaybeSignal<T, E>
impl<T, E> Clone for ElementsMaybeSignal<T, E>
Source§impl<T, E> Default for ElementsMaybeSignal<T, E>
impl<T, E> Default for ElementsMaybeSignal<T, E>
Source§impl From<&[&str]> for ElementsMaybeSignal<EventTarget, EventTarget>
impl From<&[&str]> for ElementsMaybeSignal<EventTarget, EventTarget>
Source§impl<const C: usize> From<&[&str; C]> for ElementsMaybeSignal<EventTarget, EventTarget>
impl<const C: usize> From<&[&str; C]> for ElementsMaybeSignal<EventTarget, EventTarget>
Source§impl<HtmlEl> From<&[HtmlElement<HtmlEl>]> for ElementsMaybeSignal<Element, Element>
impl<HtmlEl> From<&[HtmlElement<HtmlEl>]> for ElementsMaybeSignal<Element, Element>
Source§fn from(value: &[HtmlElement<HtmlEl>]) -> Self
fn from(value: &[HtmlElement<HtmlEl>]) -> Self
Converts to this type from the input type.
Source§impl<HtmlEl> From<&[HtmlElement<HtmlEl>]> for ElementsMaybeSignal<EventTarget, EventTarget>
impl<HtmlEl> From<&[HtmlElement<HtmlEl>]> for ElementsMaybeSignal<EventTarget, EventTarget>
Source§fn from(value: &[HtmlElement<HtmlEl>]) -> Self
fn from(value: &[HtmlElement<HtmlEl>]) -> Self
Converts to this type from the input type.
Source§impl<R> From<&[NodeRef<R>]> for ElementsMaybeSignal<Element, Element>where
R: ElementDescriptor + Clone + 'static,
impl<R> From<&[NodeRef<R>]> for ElementsMaybeSignal<Element, Element>where
R: ElementDescriptor + Clone + 'static,
Source§impl<R> From<&[NodeRef<R>]> for ElementsMaybeSignal<EventTarget, EventTarget>where
R: ElementDescriptor + Clone + 'static,
impl<R> From<&[NodeRef<R>]> for ElementsMaybeSignal<EventTarget, EventTarget>where
R: ElementDescriptor + Clone + 'static,
Source§impl<T, E> From<&[Option<T>]> for ElementsMaybeSignal<T, E>
impl<T, E> From<&[Option<T>]> for ElementsMaybeSignal<T, E>
Source§impl<T, E> From<&[Signal<T>]> for ElementsMaybeSignal<T, E>
impl<T, E> From<&[Signal<T>]> for ElementsMaybeSignal<T, E>
Source§impl From<&[String]> for ElementsMaybeSignal<EventTarget, EventTarget>
impl From<&[String]> for ElementsMaybeSignal<EventTarget, EventTarget>
Source§impl<const C: usize> From<&[String; C]> for ElementsMaybeSignal<EventTarget, EventTarget>
impl<const C: usize> From<&[String; C]> for ElementsMaybeSignal<EventTarget, EventTarget>
Source§impl<T, E> From<&[T]> for ElementsMaybeSignal<T, E>
impl<T, E> From<&[T]> for ElementsMaybeSignal<T, E>
Source§impl<const C: usize> From<[&str; C]> for ElementsMaybeSignal<EventTarget, EventTarget>
impl<const C: usize> From<[&str; C]> for ElementsMaybeSignal<EventTarget, EventTarget>
Source§impl<HtmlEl, const C: usize> From<[HtmlElement<HtmlEl>; C]> for ElementsMaybeSignal<Element, Element>
impl<HtmlEl, const C: usize> From<[HtmlElement<HtmlEl>; C]> for ElementsMaybeSignal<Element, Element>
Source§fn from(value: [HtmlElement<HtmlEl>; C]) -> Self
fn from(value: [HtmlElement<HtmlEl>; C]) -> Self
Converts to this type from the input type.
Source§impl<HtmlEl, const C: usize> From<[HtmlElement<HtmlEl>; C]> for ElementsMaybeSignal<EventTarget, EventTarget>
impl<HtmlEl, const C: usize> From<[HtmlElement<HtmlEl>; C]> for ElementsMaybeSignal<EventTarget, EventTarget>
Source§fn from(value: [HtmlElement<HtmlEl>; C]) -> Self
fn from(value: [HtmlElement<HtmlEl>; C]) -> Self
Converts to this type from the input type.
Source§impl<R, const C: usize> From<[NodeRef<R>; C]> for ElementsMaybeSignal<Element, Element>where
R: ElementDescriptor + Clone + 'static,
impl<R, const C: usize> From<[NodeRef<R>; C]> for ElementsMaybeSignal<Element, Element>where
R: ElementDescriptor + Clone + 'static,
Source§impl<R, const C: usize> From<[NodeRef<R>; C]> for ElementsMaybeSignal<EventTarget, EventTarget>where
R: ElementDescriptor + Clone + 'static,
impl<R, const C: usize> From<[NodeRef<R>; C]> for ElementsMaybeSignal<EventTarget, EventTarget>where
R: ElementDescriptor + Clone + 'static,
Source§impl<const C: usize> From<[String; C]> for ElementsMaybeSignal<EventTarget, EventTarget>
impl<const C: usize> From<[String; C]> for ElementsMaybeSignal<EventTarget, EventTarget>
Source§impl<T, E> From<ElementMaybeSignal<T, E>> for ElementsMaybeSignal<T, E>
impl<T, E> From<ElementMaybeSignal<T, E>> for ElementsMaybeSignal<T, E>
Source§fn from(signal: ElementMaybeSignal<T, E>) -> Self
fn from(signal: ElementMaybeSignal<T, E>) -> Self
Converts to this type from the input type.
Source§impl<HtmlEl> From<HtmlElement<HtmlEl>> for ElementsMaybeSignal<Element, Element>
impl<HtmlEl> From<HtmlElement<HtmlEl>> for ElementsMaybeSignal<Element, Element>
Source§fn from(value: HtmlElement<HtmlEl>) -> Self
fn from(value: HtmlElement<HtmlEl>) -> Self
Converts to this type from the input type.
Source§impl<HtmlEl> From<HtmlElement<HtmlEl>> for ElementsMaybeSignal<EventTarget, EventTarget>
impl<HtmlEl> From<HtmlElement<HtmlEl>> for ElementsMaybeSignal<EventTarget, EventTarget>
Source§fn from(value: HtmlElement<HtmlEl>) -> Self
fn from(value: HtmlElement<HtmlEl>) -> Self
Converts to this type from the input type.
Source§impl<T, E> From<Memo<T>> for ElementsMaybeSignal<T, E>
impl<T, E> From<Memo<T>> for ElementsMaybeSignal<T, E>
Source§impl<R> From<NodeRef<R>> for ElementsMaybeSignal<Element, Element>where
R: ElementDescriptor + Clone + 'static,
impl<R> From<NodeRef<R>> for ElementsMaybeSignal<Element, Element>where
R: ElementDescriptor + Clone + 'static,
Source§impl<R> From<NodeRef<R>> for ElementsMaybeSignal<EventTarget, EventTarget>where
R: ElementDescriptor + Clone + 'static,
impl<R> From<NodeRef<R>> for ElementsMaybeSignal<EventTarget, EventTarget>where
R: ElementDescriptor + Clone + 'static,
Source§impl<T, E> From<Option<T>> for ElementsMaybeSignal<T, E>
impl<T, E> From<Option<T>> for ElementsMaybeSignal<T, E>
Source§impl<E> From<ReadSignal<&str>> for ElementsMaybeSignal<Node, E>
impl<E> From<ReadSignal<&str>> for ElementsMaybeSignal<Node, E>
Source§fn from(signal: ReadSignal<&str>) -> Self
fn from(signal: ReadSignal<&str>) -> Self
Converts to this type from the input type.
Source§impl<T, E> From<ReadSignal<Option<T>>> for ElementsMaybeSignal<T, E>
impl<T, E> From<ReadSignal<Option<T>>> for ElementsMaybeSignal<T, E>
Source§fn from(signal: ReadSignal<Option<T>>) -> Self
fn from(signal: ReadSignal<Option<T>>) -> Self
Converts to this type from the input type.
Source§impl<E> From<ReadSignal<String>> for ElementsMaybeSignal<Node, E>
impl<E> From<ReadSignal<String>> for ElementsMaybeSignal<Node, E>
Source§fn from(signal: ReadSignal<String>) -> Self
fn from(signal: ReadSignal<String>) -> Self
Converts to this type from the input type.
Source§impl<T, E> From<ReadSignal<T>> for ElementsMaybeSignal<T, E>
impl<T, E> From<ReadSignal<T>> for ElementsMaybeSignal<T, E>
Source§fn from(signal: ReadSignal<T>) -> Self
fn from(signal: ReadSignal<T>) -> Self
Converts to this type from the input type.
Source§impl<T, E> From<RwSignal<T>> for ElementsMaybeSignal<T, E>
impl<T, E> From<RwSignal<T>> for ElementsMaybeSignal<T, E>
Source§impl<T, E> From<Signal<T>> for ElementsMaybeSignal<T, E>
impl<T, E> From<Signal<T>> for ElementsMaybeSignal<T, E>
Source§impl<T, E> From<T> for ElementsMaybeSignal<T, E>
impl<T, E> From<T> for ElementsMaybeSignal<T, E>
Source§impl<E> From<UseDocument> for ElementsMaybeSignal<Document, E>
impl<E> From<UseDocument> for ElementsMaybeSignal<Document, E>
Source§fn from(value: UseDocument) -> Self
fn from(value: UseDocument) -> Self
Converts to this type from the input type.
Source§impl From<Vec<&str>> for ElementsMaybeSignal<EventTarget, EventTarget>
impl From<Vec<&str>> for ElementsMaybeSignal<EventTarget, EventTarget>
Source§impl<HtmlEl> From<Vec<HtmlElement<HtmlEl>>> for ElementsMaybeSignal<Element, Element>
impl<HtmlEl> From<Vec<HtmlElement<HtmlEl>>> for ElementsMaybeSignal<Element, Element>
Source§fn from(value: Vec<HtmlElement<HtmlEl>>) -> Self
fn from(value: Vec<HtmlElement<HtmlEl>>) -> Self
Converts to this type from the input type.
Source§impl<HtmlEl> From<Vec<HtmlElement<HtmlEl>>> for ElementsMaybeSignal<EventTarget, EventTarget>
impl<HtmlEl> From<Vec<HtmlElement<HtmlEl>>> for ElementsMaybeSignal<EventTarget, EventTarget>
Source§fn from(value: Vec<HtmlElement<HtmlEl>>) -> Self
fn from(value: Vec<HtmlElement<HtmlEl>>) -> Self
Converts to this type from the input type.
Source§impl<R> From<Vec<NodeRef<R>>> for ElementsMaybeSignal<Element, Element>where
R: ElementDescriptor + Clone + 'static,
impl<R> From<Vec<NodeRef<R>>> for ElementsMaybeSignal<Element, Element>where
R: ElementDescriptor + Clone + 'static,
Source§impl<R> From<Vec<NodeRef<R>>> for ElementsMaybeSignal<EventTarget, EventTarget>where
R: ElementDescriptor + Clone + 'static,
impl<R> From<Vec<NodeRef<R>>> for ElementsMaybeSignal<EventTarget, EventTarget>where
R: ElementDescriptor + Clone + 'static,
Source§impl From<Vec<String>> for ElementsMaybeSignal<EventTarget, EventTarget>
impl From<Vec<String>> for ElementsMaybeSignal<EventTarget, EventTarget>
Source§impl<T, E> From<Vec<T>> for ElementsMaybeSignal<T, E>
impl<T, E> From<Vec<T>> for ElementsMaybeSignal<T, E>
Source§impl<T, E> SignalGet for ElementsMaybeSignal<T, E>
impl<T, E> SignalGet for ElementsMaybeSignal<T, E>
Source§impl<T, E> SignalGetUntracked for ElementsMaybeSignal<T, E>
impl<T, E> SignalGetUntracked for ElementsMaybeSignal<T, E>
Source§impl<T, E> SignalWith for ElementsMaybeSignal<T, E>
impl<T, E> SignalWith for ElementsMaybeSignal<T, E>
Source§impl<T, E> SignalWithUntracked for ElementsMaybeSignal<T, E>
impl<T, E> SignalWithUntracked for ElementsMaybeSignal<T, E>
Auto Trait Implementations§
impl<T, E> Freeze for ElementsMaybeSignal<T, E>
impl<T, E> !RefUnwindSafe for ElementsMaybeSignal<T, E>
impl<T, E> !Send for ElementsMaybeSignal<T, E>
impl<T, E> !Sync for ElementsMaybeSignal<T, E>
impl<T, E> Unpin for ElementsMaybeSignal<T, E>
impl<T, E> !UnwindSafe for ElementsMaybeSignal<T, E>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more