Skip to main content

Signal

Struct Signal 

Source
pub struct Signal<T, S = SyncStorage>
where S: Storage<T>,
{ /* private fields */ }
Expand description

A wrapper for any kind of arena-allocated reactive signal: a ReadSignal, Memo, RwSignal, or derived signal closure, or a plain value of the same type

This allows you to create APIs that take T or any reactive value that returns T as an argument, rather than adding a generic F: Fn() -> T.

Values can be accessed with the same function call, read(), with(), and get() APIs as other signals.

§Important Notes about Derived Signals

Signal::derive() is simply a way to box and type-erase a “derived signal,” which is a plain closure that accesses one or more signals. It does not cache the value of that computation. Accessing the value of a Signal<_> that is created using Signal::derive() will run the closure again every time you call .read(), .with(), or .get().

If you want the closure to run the minimal number of times necessary to update its state, and then to cache its value, you should use a Memo (and convert it into a Signal<_>) rather than using Signal::derive().

Note that for many computations, it is nevertheless less expensive to use a derived signal than to create a separate memo and to cache the value: creating a new reactive node and taking the lock on that cached value whenever you access the signal is more expensive than simply re-running the calculation in many cases.

Implementations§

Source§

impl<T> Signal<T>
where T: Send + Sync + 'static,

Source

pub fn derive( derived_signal: impl Fn() -> T + Send + Sync + 'static, ) -> Signal<T>

Wraps a derived signal, i.e., any computation that accesses one or more reactive signals.

let (count, set_count) = signal(2);
let double_count = Signal::derive(move || count.get() * 2);

// this function takes any kind of wrapped signal
fn above_3(arg: &Signal<i32>) -> bool {
    arg.get() > 3
}

assert_eq!(above_3(&count.into()), false);
assert_eq!(above_3(&double_count), true);
Source

pub fn stored(value: T) -> Signal<T>

Moves a static, nonreactive value into a signal, backed by ArcStoredValue.

Source§

impl<T> Signal<T, LocalStorage>
where T: 'static,

Source

pub fn derive_local( derived_signal: impl Fn() -> T + 'static, ) -> Signal<T, LocalStorage>

Wraps a derived signal. Works like Signal::derive but uses LocalStorage.

Source

pub fn stored_local(value: T) -> Signal<T, LocalStorage>

Moves a static, nonreactive value into a signal, backed by ArcStoredValue. Works like Signal::stored but uses LocalStorage.

Trait Implementations§

Source§

impl<T, S> Clone for Signal<T, S>
where S: Storage<T>,

Source§

fn clone(&self) -> Signal<T, S>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T, S> Copy for Signal<T, S>
where S: Storage<T>,

Source§

impl<T, S> Debug for Signal<T, S>
where S: Debug + Storage<T>,

Source§

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

Formats the value using the given formatter. Read more
Source§

impl<T> Default for Signal<T>
where T: Send + Sync + Default + 'static,

Source§

fn default() -> Signal<T>

Returns the “default value” for a type. Read more
Source§

impl<T> Default for Signal<T, LocalStorage>
where T: Default + 'static,

Source§

fn default() -> Signal<T, LocalStorage>

Returns the “default value” for a type. Read more
Source§

impl<T, S> DefinedAt for Signal<T, S>
where S: Storage<T>,

Source§

fn defined_at(&self) -> Option<&'static Location<'static>>

Returns the location at which the signal was defined. This is usually simply None in release mode.
Source§

impl<'de, T> Deserialize<'de> for Signal<T>
where T: Deserialize<'de> + Send + Sync + Serialize + 'static,

Source§

fn deserialize<D>( deserializer: D, ) -> Result<Signal<T>, <D as Deserializer<'de>>::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl<T, S> Dispose for Signal<T, S>
where S: Storage<T>,

Source§

fn dispose(self)

Disposes of the signal. This: Read more
Source§

impl<T, S> Eq for Signal<T, S>
where S: Storage<T>,

Source§

impl<T, S> Fn() for Signal<T, S>
where Signal<T, S>: Get, S: Storage<T> + Storage<Option<T>> + Storage<SignalTypes<Option<T>, S>>,

Available on rustc_nightly and crate feature nightly only.
Source§

extern "rust-call" fn call( &self, _args: (), ) -> <Signal<T, S> as FnOnce()>::Output

🔬This is a nightly-only experimental API. (fn_traits)
Performs the call operation.
Source§

impl<T, S> FnMut() for Signal<T, S>
where Signal<T, S>: Get, S: Storage<T> + Storage<Option<T>> + Storage<SignalTypes<Option<T>, S>>,

Available on rustc_nightly and crate feature nightly only.
Source§

extern "rust-call" fn call_mut( &mut self, _args: (), ) -> <Signal<T, S> as FnOnce()>::Output

🔬This is a nightly-only experimental API. (fn_traits)
Performs the call operation.
Source§

impl<T, S> FnOnce() for Signal<T, S>
where Signal<T, S>: Get, S: Storage<T> + Storage<Option<T>> + Storage<SignalTypes<Option<T>, S>>,

Available on rustc_nightly and crate feature nightly only.
Source§

type Output = <Signal<T, S> as Get>::Value

The returned type after the call operator is used.
Source§

extern "rust-call" fn call_once( self, _args: (), ) -> <Signal<T, S> as FnOnce()>::Output

🔬This is a nightly-only experimental API. (fn_traits)
Performs the call operation.
Source§

impl From<&str> for Signal<String>

Source§

fn from(value: &str) -> Signal<String>

Converts to this type from the input type.
Source§

impl From<&str> for Signal<String, LocalStorage>

Source§

fn from(value: &str) -> Signal<String, LocalStorage>

Converts to this type from the input type.
Source§

impl From<&str> for Signal<Option<String>>

Source§

fn from(value: &str) -> Signal<Option<String>>

Converts to this type from the input type.
Source§

impl From<&str> for Signal<Option<String>, LocalStorage>

Source§

fn from(value: &str) -> Signal<Option<String>, LocalStorage>

Converts to this type from the input type.
Source§

impl<T> From<ArcMappedSignal<T>> for Signal<T>
where T: Clone + Send + Sync + 'static,

Source§

fn from(value: ArcMappedSignal<T>) -> Signal<T>

Converts to this type from the input type.
Source§

impl<T> From<ArcMemo<T, LocalStorage>> for Signal<T, LocalStorage>
where T: Send + Sync + 'static,

Source§

fn from(value: ArcMemo<T, LocalStorage>) -> Signal<T, LocalStorage>

Converts to this type from the input type.
Source§

impl<T> From<ArcMemo<T>> for Signal<T>
where T: Send + Sync + 'static,

Source§

fn from(value: ArcMemo<T>) -> Signal<T>

Converts to this type from the input type.
Source§

impl<T> From<ArcReadSignal<T>> for Signal<T>
where T: Send + Sync + 'static,

Source§

fn from(value: ArcReadSignal<T>) -> Signal<T>

Converts to this type from the input type.
Source§

impl<T> From<ArcReadSignal<T>> for Signal<T, LocalStorage>
where T: Send + Sync + 'static,

Source§

fn from(value: ArcReadSignal<T>) -> Signal<T, LocalStorage>

Converts to this type from the input type.
Source§

impl<T> From<ArcRwSignal<T>> for Signal<T>
where T: Send + Sync + 'static,

Source§

fn from(value: ArcRwSignal<T>) -> Signal<T>

Converts to this type from the input type.
Source§

impl<T> From<ArcRwSignal<T>> for Signal<T, LocalStorage>
where T: Send + Sync + 'static,

Source§

fn from(value: ArcRwSignal<T>) -> Signal<T, LocalStorage>

Converts to this type from the input type.
Source§

impl<T> From<ArcSignal<T>> for Signal<T>
where T: Send + Sync + 'static,

Source§

fn from(value: ArcSignal<T>) -> Signal<T>

Converts to this type from the input type.
Source§

impl<T> From<MappedSignal<T>> for Signal<T>
where T: Clone + Send + Sync + 'static,

Source§

fn from(value: MappedSignal<T>) -> Signal<T>

Converts to this type from the input type.
Source§

impl<T> From<MaybeSignal<T, LocalStorage>> for Signal<T, LocalStorage>
where T: Send + Sync + 'static,

Source§

fn from(value: MaybeSignal<T, LocalStorage>) -> Signal<T, LocalStorage>

Converts to this type from the input type.
Source§

impl<T> From<MaybeSignal<T, LocalStorage>> for Signal<Option<T>, LocalStorage>
where T: Clone + Send + Sync + 'static,

Source§

fn from(value: MaybeSignal<T, LocalStorage>) -> Signal<Option<T>, LocalStorage>

Converts to this type from the input type.
Source§

impl<T> From<MaybeSignal<T>> for Signal<T>
where T: Send + Sync + 'static,

Source§

fn from(value: MaybeSignal<T>) -> Signal<T>

Converts to this type from the input type.
Source§

impl<T> From<MaybeSignal<T>> for Signal<Option<T>>
where T: Clone + Send + Sync + 'static,

Source§

fn from(value: MaybeSignal<T>) -> Signal<Option<T>>

Converts to this type from the input type.
Source§

impl<T> From<Memo<T, LocalStorage>> for Signal<T, LocalStorage>
where T: 'static,

Source§

fn from(value: Memo<T, LocalStorage>) -> Signal<T, LocalStorage>

Converts to this type from the input type.
Source§

impl<T> From<Memo<T>> for Signal<T>
where T: Send + Sync + 'static,

Source§

fn from(value: Memo<T>) -> Signal<T>

Converts to this type from the input type.
Source§

impl<T> From<ReadSignal<T, LocalStorage>> for Signal<T, LocalStorage>
where T: 'static,

Source§

fn from(value: ReadSignal<T, LocalStorage>) -> Signal<T, LocalStorage>

Converts to this type from the input type.
Source§

impl<T> From<ReadSignal<T>> for Signal<T>
where T: Send + Sync + 'static,

Source§

fn from(value: ReadSignal<T>) -> Signal<T>

Converts to this type from the input type.
Source§

impl<T> From<RwSignal<T, LocalStorage>> for Signal<T, LocalStorage>
where T: 'static,

Source§

fn from(value: RwSignal<T, LocalStorage>) -> Signal<T, LocalStorage>

Converts to this type from the input type.
Source§

impl<T> From<RwSignal<T>> for Signal<T>
where T: Send + Sync + 'static,

Source§

fn from(value: RwSignal<T>) -> Signal<T>

Converts to this type from the input type.
Source§

impl From<Signal<&'static str, LocalStorage>> for Signal<String, LocalStorage>

Source§

fn from( value: Signal<&'static str, LocalStorage>, ) -> Signal<String, LocalStorage>

Converts to this type from the input type.
Source§

impl From<Signal<&'static str>> for Signal<String>

Source§

fn from(value: Signal<&'static str>) -> Signal<String>

Converts to this type from the input type.
Source§

impl From<Signal<&'static str>> for Signal<String, LocalStorage>

Source§

fn from(value: Signal<&'static str>) -> Signal<String, LocalStorage>

Converts to this type from the input type.
Source§

impl From<Signal<&'static str>> for Signal<Option<String>>

Source§

fn from(value: Signal<&'static str>) -> Signal<Option<String>>

Converts to this type from the input type.
Source§

impl From<Signal<&'static str>> for Signal<Option<String>, LocalStorage>

Source§

fn from(value: Signal<&'static str>) -> Signal<Option<String>, LocalStorage>

Converts to this type from the input type.
Source§

impl From<Signal<Option<&'static str>, LocalStorage>> for Signal<Option<String>, LocalStorage>

Source§

fn from( value: Signal<Option<&'static str>, LocalStorage>, ) -> Signal<Option<String>, LocalStorage>

Converts to this type from the input type.
Source§

impl From<Signal<Option<&'static str>>> for Signal<Option<String>>

Source§

fn from(value: Signal<Option<&'static str>>) -> Signal<Option<String>>

Converts to this type from the input type.
Source§

impl From<Signal<Option<&'static str>>> for Signal<Option<String>, LocalStorage>

Source§

fn from( value: Signal<Option<&'static str>>, ) -> Signal<Option<String>, LocalStorage>

Converts to this type from the input type.
Source§

impl<T> From<Signal<Option<T>, LocalStorage>> for MaybeProp<T, LocalStorage>

Source§

fn from(value: Signal<Option<T>, LocalStorage>) -> MaybeProp<T, LocalStorage>

Converts to this type from the input type.
Source§

impl<T> From<Signal<Option<T>>> for MaybeProp<T>
where T: Send + Sync, SyncStorage: Storage<Option<T>>,

Source§

fn from(value: Signal<Option<T>>) -> MaybeProp<T>

Converts to this type from the input type.
Source§

impl<T> From<Signal<T, LocalStorage>> for Signal<Option<T>, LocalStorage>
where T: Clone + 'static,

Source§

fn from(value: Signal<T, LocalStorage>) -> Signal<Option<T>, LocalStorage>

Converts to this type from the input type.
Source§

impl<T> From<Signal<T, LocalStorage>> for MaybeProp<T, LocalStorage>
where T: Send + Sync + Clone,

Source§

fn from(value: Signal<T, LocalStorage>) -> MaybeProp<T, LocalStorage>

Converts to this type from the input type.
Source§

impl<T, S> From<Signal<T, S>> for ArcSignal<T, S>
where S: Storage<SignalTypes<T, S>> + Storage<T>,

Source§

fn from(value: Signal<T, S>) -> ArcSignal<T, S>

Converts to this type from the input type.
Source§

impl<T, S> From<Signal<T, S>> for MaybeSignal<T, S>
where S: Storage<T>,

Source§

fn from(value: Signal<T, S>) -> MaybeSignal<T, S>

Converts to this type from the input type.
Source§

impl<T> From<Signal<T>> for Signal<Option<T>>
where T: Clone + Send + Sync + 'static,

Source§

fn from(value: Signal<T>) -> Signal<Option<T>>

Converts to this type from the input type.
Source§

impl<T> From<Signal<T>> for MaybeProp<T>
where T: Send + Sync + Clone,

Source§

fn from(value: Signal<T>) -> MaybeProp<T>

Converts to this type from the input type.
Source§

impl<Inner, Prev, T> From<Subfield<Inner, Prev, T>> for Signal<T>
where Inner: StoreField<Value = Prev> + Track + Send + Sync + 'static, Prev: 'static, T: Send + Sync + Clone + 'static,

Source§

fn from(subfield: Subfield<Inner, Prev, T>) -> Signal<T>

Converts to this type from the input type.
Source§

impl<T> From<T> for Signal<T>
where T: Send + Sync + 'static,

Source§

fn from(value: T) -> Signal<T>

Converts to this type from the input type.
Source§

impl<T> From<T> for Signal<T, LocalStorage>
where T: 'static,

Source§

fn from(value: T) -> Signal<T, LocalStorage>

Converts to this type from the input type.
Source§

impl<T> From<T> for Signal<Option<T>>
where T: Send + Sync + 'static,

Source§

fn from(value: T) -> Signal<Option<T>>

Converts to this type from the input type.
Source§

impl<T> From<T> for Signal<Option<T>, LocalStorage>
where T: 'static,

Source§

fn from(value: T) -> Signal<Option<T>, LocalStorage>

Converts to this type from the input type.
Source§

impl<T> FromLocal<ArcSignal<T, LocalStorage>> for Signal<T, LocalStorage>
where T: 'static,

Source§

fn from_local(value: ArcSignal<T, LocalStorage>) -> Signal<T, LocalStorage>

Converts between the types.
Source§

impl<T, S> PartialEq for Signal<T, S>
where S: Storage<T>,

Source§

fn eq(&self, other: &Signal<T, S>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<T, S> ReadUntracked for Signal<T, S>
where T: 'static, S: Storage<SignalTypes<T, S>> + Storage<T>,

Source§

fn custom_try_read( &self, ) -> Option<Option<<Signal<T, S> as ReadUntracked>::Value>>

Overriding the default auto implemented Read::try_read to combine read and track, to avoid 2 clones and just have 1 in the SignalTypes::DerivedSignal.

Source§

type Value = ReadGuard<T, SignalReadGuard<T, S>>

The guard type that will be returned, which can be dereferenced to the value.
Source§

fn try_read_untracked(&self) -> Option<<Signal<T, S> as ReadUntracked>::Value>

Returns the guard, or None if the signal has already been disposed.
Source§

fn read_untracked(&self) -> Self::Value

Returns the guard. Read more
Source§

impl<T, St> Serialize for Signal<T, St>
where T: Send + Sync + Serialize + 'static, St: Storage<SignalTypes<T, St>> + Storage<T>,

Source§

fn serialize<S>( &self, serializer: S, ) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl<T, S> Track for Signal<T, S>
where T: 'static, S: Storage<T> + Storage<SignalTypes<T, S>>,

Source§

fn track(&self)

Subscribes to this signal in the current reactive scope without doing anything with its value.

Auto Trait Implementations§

§

impl<T, S> Freeze for Signal<T, S>

§

impl<T, S> RefUnwindSafe for Signal<T, S>

§

impl<T, S> Send for Signal<T, S>

§

impl<T, S> Sync for Signal<T, S>

§

impl<T, S> Unpin for Signal<T, S>

§

impl<T, S> UnsafeUnpin for Signal<T, S>

§

impl<T, S> UnwindSafe for Signal<T, S>

Blanket Implementations§

Source§

impl<F, V> AddAnyAttr for F
where F: ReactiveFunction<Output = V>, V: RenderHtml + 'static,

Source§

type Output<SomeNewAttr: Attribute> = Box<dyn FnMut() -> <V as AddAnyAttr>::Output<<SomeNewAttr as Attribute>::CloneableOwned> + Send>

The new type once the attribute has been added.
Source§

fn add_any_attr<NewAttr>( self, attr: NewAttr, ) -> <F as AddAnyAttr>::Output<NewAttr>
where NewAttr: Attribute, <F as AddAnyAttr>::Output<NewAttr>: RenderHtml,

Adds an attribute to the view.
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> ArchivePointee for T

Source§

type ArchivedMetadata = ()

The archived version of the pointer metadata for this type.
Source§

fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata

Converts some archived metadata to the pointer metadata for itself.
Source§

impl<F, V> AttributeValue for F
where F: ReactiveFunction<Output = V>, V: AttributeValue + 'static, <V as AttributeValue>::State: 'static,

Source§

type AsyncOutput = <V as AttributeValue>::AsyncOutput

The type once all async data have loaded.
Source§

type State = RenderEffect<<V as AttributeValue>::State>

The state that should be retained between building and rebuilding.
Source§

type Cloneable = Arc<Mutex<dyn FnMut() -> V + Send>>

A version of the value that can be cloned. This can be the same type, or a reference-counted type. Generally speaking, this does not need to refer to the same data, but should behave in the same way. So for example, making an event handler cloneable should probably make it reference-counted (so that a FnMut() continues mutating the same closure), but making a String cloneable does not necessarily need to make it an Arc<str>, as two different clones of a String will still have the same value.
Source§

type CloneableOwned = Arc<Mutex<dyn FnMut() -> V + Send>>

A cloneable type that is also 'static. This is used for spreading across types when the spreadable attribute needs to be owned. In some cases (&'a str to Arc<str>, etc.) the owned cloneable type has worse performance than the cloneable type, so they are separate.
Source§

fn html_len(&self) -> usize

An approximation of the actual length of this attribute in HTML.
Source§

fn to_html(self, key: &str, buf: &mut String)

Renders the attribute value to HTML.
Source§

fn to_template(_key: &str, _buf: &mut String)

Renders the attribute value to HTML for a <template>.
Source§

fn hydrate<const FROM_SERVER: bool>( self, key: &str, el: &Element, ) -> <F as AttributeValue>::State

Adds interactivity as necessary, given DOM nodes that were created from HTML that has either been rendered on the server, or cloned for a <template>.
Source§

fn build(self, el: &Element, key: &str) -> <F as AttributeValue>::State

Adds this attribute to the element during client-side rendering.
Source§

fn rebuild(self, key: &str, state: &mut <F as AttributeValue>::State)

Applies a new value for the attribute.
Source§

fn into_cloneable(self) -> <F as AttributeValue>::Cloneable

Converts this attribute into an equivalent that can be cloned.
Source§

fn into_cloneable_owned(self) -> <F as AttributeValue>::CloneableOwned

Converts this attributes into an equivalent that can be cloned and is 'static.
Source§

fn dry_resolve(&mut self)

“Runs” the attribute without other side effects. For primitive types, this is a no-op. For reactive types, this can be used to gather data about reactivity or about asynchronous data that needs to be loaded.
Source§

async fn resolve(self) -> <F as AttributeValue>::AsyncOutput

“Resolves” this into a form that is not waiting for any asynchronous data.
Source§

impl<V, Key, Sig, T> BindAttribute<Key, Sig, T> for V
where V: AddAnyAttr, Key: AttributeKey, Sig: IntoSplitSignal<Value = T>, T: FromEventTarget + AttributeValue + PartialEq + Sync + 'static, Signal<BoolOrT<T>>: IntoProperty, <Sig as IntoSplitSignal>::Read: Get<Value = T> + Send + Sync + Clone + 'static, <Sig as IntoSplitSignal>::Write: Send + Clone + 'static, Element: GetValue<T>,

Source§

type Output = <V as AddAnyAttr>::Output<Bind<Key, T, <Sig as IntoSplitSignal>::Read, <Sig as IntoSplitSignal>::Write>>

The type of the element with the two-way binding added.
Source§

fn bind( self, key: Key, signal: Sig, ) -> <V as BindAttribute<Key, Sig, T>>::Output

Adds a two-way binding to the element, which adds an attribute and an event listener to the element when the element is created or hydrated. 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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<F> ComponentFunction<(), EmptyMarker> for F
where F: Fn() -> Result<VNode, RenderError> + Clone + 'static,

Source§

fn rebuild(&self, props: ()) -> Result<VNode, RenderError>

Convert the component to a function that takes props and returns an element.
Source§

fn fn_ptr(&self) -> usize

Get the raw address of the component render function.
Source§

impl<T, K, V> CustomAttribute<K, V> for T

Source§

fn attr(self, key: K, value: V) -> Self::Output<CustomAttr<K, V>>

Adds an HTML attribute by key and value.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<V, T, P, D> DirectiveAttribute<T, P, D> for V
where V: AddAnyAttr, D: IntoDirective<T, P>, P: Clone + 'static, T: 'static,

Source§

type Output = <V as AddAnyAttr>::Output<Directive<T, D, P>>

The type of the element with the directive added.
Source§

fn directive( self, handler: D, param: P, ) -> <V as DirectiveAttribute<T, P, D>>::Output

Adds a directive to the element, which runs some custom logic in the browser when the element is created or hydrated.
Source§

impl<Func> EffectFunction<(), NoParam> for Func
where Func: FnMut(),

Source§

fn run(&mut self, _: Option<()>)

Call this to execute the function. In case the actual function has no parameters the parameter p will simply be ignored.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<!> for T

Source§

fn from(t: !) -> T

Converts to this type from the input type.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromFormData for T

Source§

fn from_event(ev: &Event) -> Result<T, FromFormDataError>

Tries to deserialize the data, given only the submit event.
Source§

fn from_form_data(form_data: &FormData) -> Result<T, Error>

Tries to deserialize the data, given the actual form data.
Source§

impl<E, T, Request> FromReq<DeleteUrl, Request, E> for T
where Request: Req<E> + Send + 'static, T: DeserializeOwned, E: FromServerFnError,

Source§

async fn from_req(req: Request) -> Result<T, E>

Attempts to deserialize the arguments from a request.
Source§

impl<E, T, Request> FromReq<GetUrl, Request, E> for T
where Request: Req<E> + Send + 'static, T: DeserializeOwned, E: FromServerFnError,

Source§

async fn from_req(req: Request) -> Result<T, E>

Attempts to deserialize the arguments from a request.
Source§

impl<E, T, Request> FromReq<MultipartFormData, Request, E> for T
where Request: Req<E> + Send + 'static, T: From<MultipartData>, E: FromServerFnError + Send + Sync,

Source§

async fn from_req(req: Request) -> Result<T, E>

Attempts to deserialize the arguments from a request.
Source§

impl<E, T, Request, Encoding> FromReq<Patch<Encoding>, Request, E> for T
where Request: Req<E> + Send + 'static, Encoding: Decodes<T>, E: FromServerFnError,

Source§

async fn from_req(req: Request) -> Result<T, E>

Attempts to deserialize the arguments from a request.
Source§

impl<E, T, Request> FromReq<PatchUrl, Request, E> for T
where Request: Req<E> + Send + 'static, T: DeserializeOwned, E: FromServerFnError,

Source§

async fn from_req(req: Request) -> Result<T, E>

Attempts to deserialize the arguments from a request.
Source§

impl<E, T, Request, Encoding> FromReq<Post<Encoding>, Request, E> for T
where Request: Req<E> + Send + 'static, Encoding: Decodes<T>, E: FromServerFnError,

Source§

async fn from_req(req: Request) -> Result<T, E>

Attempts to deserialize the arguments from a request.
Source§

impl<E, T, Request> FromReq<PostUrl, Request, E> for T
where Request: Req<E> + Send + 'static, T: DeserializeOwned, E: FromServerFnError,

Source§

async fn from_req(req: Request) -> Result<T, E>

Attempts to deserialize the arguments from a request.
Source§

impl<E, T, Request, Encoding> FromReq<Put<Encoding>, Request, E> for T
where Request: Req<E> + Send + 'static, Encoding: Decodes<T>, E: FromServerFnError,

Source§

async fn from_req(req: Request) -> Result<T, E>

Attempts to deserialize the arguments from a request.
Source§

impl<E, T, Request> FromReq<PutUrl, Request, E> for T
where Request: Req<E> + Send + 'static, T: DeserializeOwned, E: FromServerFnError,

Source§

async fn from_req(req: Request) -> Result<T, E>

Attempts to deserialize the arguments from a request.
Source§

impl<E, T, Request> FromReq<Streaming, Request, E> for T
where Request: Req<E> + Send + 'static, T: From<ByteStream<E>> + 'static, E: FromServerFnError,

Source§

async fn from_req(req: Request) -> Result<T, E>

Attempts to deserialize the arguments from a request.
Source§

impl<E, T, Request> FromReq<StreamingText, Request, E> for T
where Request: Req<E> + Send + 'static, T: From<TextStream<E>> + 'static, E: FromServerFnError,

Source§

async fn from_req(req: Request) -> Result<T, E>

Attempts to deserialize the arguments from a request.
Source§

impl<E, Encoding, Response, T> FromRes<Patch<Encoding>, Response, E> for T
where Response: ClientRes<E> + Send, Encoding: Decodes<T>, E: FromServerFnError,

Source§

async fn from_res(res: Response) -> Result<T, E>

Attempts to deserialize the outputs from a response.
Source§

impl<E, Encoding, Response, T> FromRes<Post<Encoding>, Response, E> for T
where Response: ClientRes<E> + Send, Encoding: Decodes<T>, E: FromServerFnError,

Source§

async fn from_res(res: Response) -> Result<T, E>

Attempts to deserialize the outputs from a response.
Source§

impl<E, Encoding, Response, T> FromRes<Put<Encoding>, Response, E> for T
where Response: ClientRes<E> + Send, Encoding: Decodes<T>, E: FromServerFnError,

Source§

async fn from_res(res: Response) -> Result<T, E>

Attempts to deserialize the outputs from a response.
Source§

impl<S, T> FromStream<T> for S
where S: From<ArcReadSignal<Option<T>>> + Send + Sync, T: Send + Sync + 'static,

Source§

fn from_stream(stream: impl Stream<Item = T> + Send + 'static) -> S

Creates a signal that contains the latest value of the stream.
Source§

fn from_stream_unsync(stream: impl Stream<Item = T> + 'static) -> S

Creates a signal that contains the latest value of the stream.
Source§

impl<T> InitializeFromFunction<T> for T

Source§

fn initialize_from_function(f: fn() -> T) -> T

Create an instance of this type from an initialization function
Source§

impl<F, V> InnerHtmlValue for F
where F: ReactiveFunction<Output = V>, V: InnerHtmlValue + 'static, <V as InnerHtmlValue>::State: 'static,

Source§

type AsyncOutput = <V as InnerHtmlValue>::AsyncOutput

The type after all async data have resolved.
Source§

type State = RenderEffect<<V as InnerHtmlValue>::State>

The view state retained between building and rebuilding.
Source§

type Cloneable = Arc<Mutex<dyn FnMut() -> V + Send>>

An equivalent value that can be cloned.
Source§

type CloneableOwned = Arc<Mutex<dyn FnMut() -> V + Send>>

An equivalent value that can be cloned and is 'static.
Source§

fn html_len(&self) -> usize

The estimated length of the HTML.
Source§

fn to_html(self, buf: &mut String)

Renders the class to HTML.
Source§

fn to_template(_buf: &mut String)

Renders the class to HTML for a <template>.
Source§

fn hydrate<const FROM_SERVER: bool>( self, el: &Element, ) -> <F as InnerHtmlValue>::State

Adds interactivity as necessary, given DOM nodes that were created from HTML that has either been rendered on the server, or cloned for a <template>.
Source§

fn build(self, el: &Element) -> <F as InnerHtmlValue>::State

Adds this class to the element during client-side rendering.
Source§

fn rebuild(self, state: &mut <F as InnerHtmlValue>::State)

Updates the value.
Source§

fn into_cloneable(self) -> <F as InnerHtmlValue>::Cloneable

Converts this to a cloneable type.
Source§

fn into_cloneable_owned(self) -> <F as InnerHtmlValue>::CloneableOwned

Converts this to a cloneable, owned type.
Source§

fn dry_resolve(&mut self)

“Runs” the attribute without other side effects. For primitive types, this is a no-op. For reactive types, this can be used to gather data about reactivity or about asynchronous data that needs to be loaded.
Source§

async fn resolve(self) -> <F as InnerHtmlValue>::AsyncOutput

“Resolves” this into a type that is not waiting for any asynchronous data.
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoAny for T
where T: Send + RenderHtml,

Source§

fn into_any(self) -> AnyView

Converts the view into a type-erased AnyView.
Source§

impl<T> IntoAttributeValue for T
where T: AttributeValue,

Source§

type Output = T

The attribute value into which this type can be converted.
Source§

fn into_attribute_value(self) -> <T as IntoAttributeValue>::Output

Consumes this value, transforming it into an attribute value.
Source§

impl<F, C> IntoClass for F
where F: ReactiveFunction<Output = C>, C: IntoClass + 'static, <C as IntoClass>::State: 'static,

Source§

type AsyncOutput = <C as IntoClass>::AsyncOutput

The type after all async data have resolved.
Source§

type State = RenderEffect<<C as IntoClass>::State>

The view state retained between building and rebuilding.
Source§

type Cloneable = Arc<Mutex<dyn FnMut() -> C + Send>>

An equivalent value that can be cloned.
Source§

type CloneableOwned = Arc<Mutex<dyn FnMut() -> C + Send>>

An equivalent value that can be cloned and is 'static.
Source§

fn html_len(&self) -> usize

The estimated length of the HTML.
Source§

fn to_html(self, class: &mut String)

Renders the class to HTML.
Source§

fn hydrate<const FROM_SERVER: bool>( self, el: &Element, ) -> <F as IntoClass>::State

Adds interactivity as necessary, given DOM nodes that were created from HTML that has either been rendered on the server, or cloned for a <template>.
Source§

fn build(self, el: &Element) -> <F as IntoClass>::State

Adds this class to the element during client-side rendering.
Source§

fn rebuild(self, state: &mut <F as IntoClass>::State)

Updates the value.
Source§

fn into_cloneable(self) -> <F as IntoClass>::Cloneable

Converts this to a cloneable type.
Source§

fn into_cloneable_owned(self) -> <F as IntoClass>::CloneableOwned

Converts this to a cloneable, owned type.
Source§

fn dry_resolve(&mut self)

“Runs” the attribute without other side effects. For primitive types, this is a no-op. For reactive types, this can be used to gather data about reactivity or about asynchronous data that needs to be loaded.
Source§

async fn resolve(self) -> <F as IntoClass>::AsyncOutput

“Resolves” this into a type that is not waiting for any asynchronous data.
Source§

fn reset(state: &mut <F as IntoClass>::State)

Reset the class list to the state before this class was added.
Source§

const TEMPLATE: &'static str = ""

The HTML that should be included in a <template>.
Source§

const MIN_LENGTH: usize = _

The minimum length of the HTML.
Source§

fn should_overwrite(&self) -> bool

Whether this class attribute should overwrite previous class values. Returns true for class="..." attributes, false for class:name=value directives.
Source§

fn to_template(class: &mut String)

Renders the class to HTML for a <template>.
Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> IntoMaybeErased for T
where T: RenderHtml,

Source§

type Output = T

The type of the output.
Source§

fn into_maybe_erased(self) -> <T as IntoMaybeErased>::Output

Converts the view into a type-erased view if in erased mode.
Source§

impl<T, F> IntoOptionGetter<T, FunctionMarker> for F
where F: Fn() -> Option<T> + Send + Sync + 'static,

Source§

fn into_option_getter(self) -> OptionGetter<T>

Converts the given value into an OptionGetter.
Source§

impl<F, V> IntoProperty for F
where F: ReactiveFunction<Output = V>, V: IntoProperty + 'static, <V as IntoProperty>::State: 'static,

Source§

type State = RenderEffect<<V as IntoProperty>::State>

The view state retained between building and rebuilding.
Source§

type Cloneable = Arc<Mutex<dyn FnMut() -> V + Send>>

An equivalent value that can be cloned.
Source§

type CloneableOwned = Arc<Mutex<dyn FnMut() -> V + Send>>

An equivalent value that can be cloned and is 'static.
Source§

fn hydrate<const FROM_SERVER: bool>( self, el: &Element, key: &str, ) -> <F as IntoProperty>::State

Adds the property on an element created from HTML.
Source§

fn build(self, el: &Element, key: &str) -> <F as IntoProperty>::State

Adds the property during client-side rendering.
Source§

fn rebuild(self, state: &mut <F as IntoProperty>::State, key: &str)

Updates the property with a new value.
Source§

fn into_cloneable(self) -> <F as IntoProperty>::Cloneable

Converts this to a cloneable type.
Source§

fn into_cloneable_owned(self) -> <F as IntoProperty>::CloneableOwned

Converts this to a cloneable, owned type.
Source§

impl<T, I> IntoReactiveValue<T, __IntoReactiveValueMarkerBaseCase> for I
where I: Into<T>,

Source§

fn into_reactive_value(self) -> T

Converts self into a T.
Source§

impl<T> IntoRender for T
where T: Render,

Source§

type Output = T

The renderable type into which this type can be converted.
Source§

fn into_render(self) -> <T as IntoRender>::Output

Consumes this value, transforming it into the renderable type.
Source§

impl<E, T, Request> IntoReq<DeleteUrl, Request, E> for T
where Request: ClientReq<E>, T: Serialize + Send, E: FromServerFnError,

Source§

fn into_req(self, path: &str, accepts: &str) -> Result<Request, E>

Attempts to serialize the arguments into an HTTP request.
Source§

impl<E, T, Request> IntoReq<GetUrl, Request, E> for T
where Request: ClientReq<E>, T: Serialize + Send, E: FromServerFnError,

Source§

fn into_req(self, path: &str, accepts: &str) -> Result<Request, E>

Attempts to serialize the arguments into an HTTP request.
Source§

impl<E, T, Encoding, Request> IntoReq<Patch<Encoding>, Request, E> for T
where Request: ClientReq<E>, Encoding: Encodes<T>, E: FromServerFnError,

Source§

fn into_req(self, path: &str, accepts: &str) -> Result<Request, E>

Attempts to serialize the arguments into an HTTP request.
Source§

impl<E, T, Request> IntoReq<PatchUrl, Request, E> for T
where Request: ClientReq<E>, T: Serialize + Send, E: FromServerFnError,

Source§

fn into_req(self, path: &str, accepts: &str) -> Result<Request, E>

Attempts to serialize the arguments into an HTTP request.
Source§

impl<E, T, Encoding, Request> IntoReq<Post<Encoding>, Request, E> for T
where Request: ClientReq<E>, Encoding: Encodes<T>, E: FromServerFnError,

Source§

fn into_req(self, path: &str, accepts: &str) -> Result<Request, E>

Attempts to serialize the arguments into an HTTP request.
Source§

impl<E, T, Request> IntoReq<PostUrl, Request, E> for T
where Request: ClientReq<E>, T: Serialize + Send, E: FromServerFnError,

Source§

fn into_req(self, path: &str, accepts: &str) -> Result<Request, E>

Attempts to serialize the arguments into an HTTP request.
Source§

impl<E, T, Encoding, Request> IntoReq<Put<Encoding>, Request, E> for T
where Request: ClientReq<E>, Encoding: Encodes<T>, E: FromServerFnError,

Source§

fn into_req(self, path: &str, accepts: &str) -> Result<Request, E>

Attempts to serialize the arguments into an HTTP request.
Source§

impl<E, T, Request> IntoReq<PutUrl, Request, E> for T
where Request: ClientReq<E>, T: Serialize + Send, E: FromServerFnError,

Source§

fn into_req(self, path: &str, accepts: &str) -> Result<Request, E>

Attempts to serialize the arguments into an HTTP request.
Source§

impl<E, Response, Encoding, T> IntoRes<Patch<Encoding>, Response, E> for T
where Response: TryRes<E>, Encoding: Encodes<T>, E: FromServerFnError + Send, T: Send,

Source§

async fn into_res(self) -> Result<Response, E>

Attempts to serialize the output into an HTTP response.
Source§

impl<E, Response, Encoding, T> IntoRes<Post<Encoding>, Response, E> for T
where Response: TryRes<E>, Encoding: Encodes<T>, E: FromServerFnError + Send, T: Send,

Source§

async fn into_res(self) -> Result<Response, E>

Attempts to serialize the output into an HTTP response.
Source§

impl<E, Response, Encoding, T> IntoRes<Put<Encoding>, Response, E> for T
where Response: TryRes<E>, Encoding: Encodes<T>, E: FromServerFnError + Send, T: Send,

Source§

async fn into_res(self) -> Result<Response, E>

Attempts to serialize the output into an HTTP response.
Source§

impl<F, C> IntoStyle for F
where F: ReactiveFunction<Output = C>, C: IntoStyle + 'static, <C as IntoStyle>::State: 'static,

Source§

type AsyncOutput = <C as IntoStyle>::AsyncOutput

The type after all async data have resolved.
Source§

type State = RenderEffect<<C as IntoStyle>::State>

The view state retained between building and rebuilding.
Source§

type Cloneable = Arc<Mutex<dyn FnMut() -> C + Send>>

An equivalent value that can be cloned.
Source§

type CloneableOwned = Arc<Mutex<dyn FnMut() -> C + Send>>

An equivalent value that can be cloned and is 'static.
Source§

fn to_html(self, style: &mut String)

Renders the style to HTML.
Source§

fn hydrate<const FROM_SERVER: bool>( self, el: &Element, ) -> <F as IntoStyle>::State

Adds interactivity as necessary, given DOM nodes that were created from HTML that has either been rendered on the server, or cloned for a <template>.
Source§

fn build(self, el: &Element) -> <F as IntoStyle>::State

Adds this style to the element during client-side rendering.
Source§

fn rebuild(self, state: &mut <F as IntoStyle>::State)

Updates the value.
Source§

fn into_cloneable(self) -> <F as IntoStyle>::Cloneable

Converts this to a cloneable type.
Source§

fn into_cloneable_owned(self) -> <F as IntoStyle>::CloneableOwned

Converts this to a cloneable, owned type.
Source§

fn dry_resolve(&mut self)

“Runs” the attribute without other side effects. For primitive types, this is a no-op. For reactive types, this can be used to gather data about reactivity or about asynchronous data that needs to be loaded.
Source§

async fn resolve(self) -> <F as IntoStyle>::AsyncOutput

“Resolves” this into a type that is not waiting for any asynchronous data.
Source§

fn reset(state: &mut <F as IntoStyle>::State)

Reset the styling to the state before this style was added.
Source§

impl<F, S> IntoStyleValue for F
where F: ReactiveFunction<Output = S>, S: IntoStyleValue + 'static,

Source§

type AsyncOutput = F

The type after all async data have resolved.
Source§

type State = (Arc<str>, RenderEffect<<S as IntoStyleValue>::State>)

The view state retained between building and rebuilding.
Source§

type Cloneable = Arc<Mutex<dyn FnMut() -> S + Send>>

An equivalent value that can be cloned.
Source§

type CloneableOwned = Arc<Mutex<dyn FnMut() -> S + Send>>

An equivalent value that can be cloned and is 'static.
Source§

fn to_html(self, name: &str, style: &mut String)

Renders the style to HTML.
Source§

fn build( self, style: &CssStyleDeclaration, name: &str, ) -> <F as IntoStyleValue>::State

Adds this style to the element during client-side rendering.
Source§

fn rebuild( self, style: &CssStyleDeclaration, name: &str, state: &mut <F as IntoStyleValue>::State, )

Updates the value.
Source§

fn hydrate( self, style: &CssStyleDeclaration, name: &str, ) -> <F as IntoStyleValue>::State

Adds interactivity as necessary, given DOM nodes that were created from HTML that has either been rendered on the server, or cloned for a <template>.
Source§

fn into_cloneable(self) -> <F as IntoStyleValue>::Cloneable

Converts this to a cloneable type.
Source§

fn into_cloneable_owned(self) -> <F as IntoStyleValue>::CloneableOwned

Converts this to a cloneable, owned type.
Source§

fn dry_resolve(&mut self)

“Runs” the attribute without other side effects. For primitive types, this is a no-op. For reactive types, this can be used to gather data about reactivity or about asynchronous data that needs to be loaded.
Source§

async fn resolve(self) -> <F as IntoStyleValue>::AsyncOutput

“Resolves” this into a type that is not waiting for any asynchronous data.
Source§

impl<T> IntoView for T
where T: Render + RenderHtml + Send,

Source§

fn into_view(self) -> View<T>

Wraps the inner type.
Source§

impl<T> LayoutRaw for T

Source§

fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>

Returns the layout of the type.
Source§

impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
where T: SharedNiching<N1, N2>, N1: Niching<T>, N2: Niching<T>,

Source§

unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool

Returns whether the given value has been niched. Read more
Source§

fn resolve_niched(out: Place<NichedOption<T, N1>>)

Writes data to out indicating that a T is niched.
Source§

impl<T> Pointee for T

Source§

type Metadata = ()

The metadata type for pointers and references to this type.
Source§

impl<F, T> ReactiveFunction for F
where F: FnMut() -> T + Send + 'static,

Source§

type Output = T

The return type of the function.
Source§

fn invoke(&mut self) -> <F as ReactiveFunction>::Output

Call the function.
Source§

fn into_shared( self, ) -> Arc<Mutex<dyn FnMut() -> <F as ReactiveFunction>::Output + Send>>

Converts the function into a cloneable, shared type.
Source§

impl<T> Read for T
where T: Track + ReadUntracked,

Source§

type Value = <T as ReadUntracked>::Value

The guard type that will be returned, which can be dereferenced to the value.
Source§

fn try_read(&self) -> Option<<T as Read>::Value>

Subscribes to the signal, and returns the guard, or None if the signal has already been disposed.
Source§

fn read(&self) -> Self::Value

Subscribes to the signal, and returns the guard. Read more
Source§

impl<F, V> Render for F
where F: ReactiveFunction<Output = V>, V: Render, <V as Render>::State: 'static,

Source§

type State = RenderEffectState<<V as Render>::State>

The “view state” for this type, which can be retained between updates. Read more
Source§

fn build(self) -> <F as Render>::State

Creates the view for the first time, without hydrating from existing HTML.
Source§

fn rebuild(self, state: &mut <F as Render>::State)

Updates the view with new data.
Source§

impl<F, V> RenderHtml for F
where F: ReactiveFunction<Output = V>, V: RenderHtml + 'static, <V as Render>::State: 'static,

Source§

const MIN_LENGTH: usize = 0

The minimum length of HTML created when this view is rendered.
Source§

type AsyncOutput = <V as RenderHtml>::AsyncOutput

The type of the view after waiting for all asynchronous data to load.
Source§

type Owned = F

An equivalent value that is 'static.
Source§

fn dry_resolve(&mut self)

“Runs” the view without other side effects. For primitive types, this is a no-op. For reactive types, this can be used to gather data about reactivity or about asynchronous data that needs to be loaded.
Source§

async fn resolve(self) -> <F as RenderHtml>::AsyncOutput

Waits for any asynchronous sections of the view to load and returns the output.
Source§

fn html_len(&self) -> usize

An estimated length for this view, when rendered to HTML. Read more
Source§

fn to_html_with_buf( self, buf: &mut String, position: &mut Position, escape: bool, mark_branches: bool, extra_attrs: Vec<AnyAttribute>, )

Renders a view to HTML, writing it into the given buffer.
Source§

fn to_html_async_with_buf<const OUT_OF_ORDER: bool>( self, buf: &mut StreamBuilder, position: &mut Position, escape: bool, mark_branches: bool, extra_attrs: Vec<AnyAttribute>, )
where F: Sized,

Renders a view into a buffer of (synchronous or asynchronous) HTML chunks.
Source§

fn hydrate<const FROM_SERVER: bool>( self, cursor: &Cursor, position: &PositionState, ) -> <F as Render>::State

Makes a set of DOM nodes rendered from HTML interactive. Read more
Source§

async fn hydrate_async( self, cursor: &Cursor, position: &PositionState, ) -> <F as Render>::State

Asynchronously makes a set of DOM nodes rendered from HTML interactive. Read more
Source§

fn into_owned(self) -> <F as RenderHtml>::Owned

Convert into the equivalent value that is 'static.
Source§

const EXISTS: bool = true

Whether this should actually exist in the DOM, if it is the child of an element.
Source§

fn to_html(self) -> String
where Self: Sized,

Renders a view to an HTML string.
Source§

fn to_html_branching(self) -> String
where Self: Sized,

Renders a view to HTML with branch markers. This can be used to support libraries that diff HTML pages against one another, by marking sections of the view that branch to different types with marker comments.
Source§

fn to_html_stream_in_order(self) -> StreamBuilder
where Self: Sized,

Renders a view to an in-order stream of HTML.
Source§

fn to_html_stream_in_order_branching(self) -> StreamBuilder
where Self: Sized,

Renders a view to an in-order stream of HTML with branch markers. This can be used to support libraries that diff HTML pages against one another, by marking sections of the view that branch to different types with marker comments.
Source§

fn to_html_stream_out_of_order(self) -> StreamBuilder
where Self: Sized,

Renders a view to an out-of-order stream of HTML.
Source§

fn to_html_stream_out_of_order_branching(self) -> StreamBuilder
where Self: Sized,

Renders a view to an out-of-order stream of HTML with branch markers. This can be used to support libraries that diff HTML pages against one another, by marking sections of the view that branch to different types with marker comments.
Source§

fn hydrate_from<const FROM_SERVER: bool>(self, el: &Element) -> Self::State
where Self: Sized,

Hydrates using RenderHtml::hydrate, beginning at the given element.
Source§

fn hydrate_from_position<const FROM_SERVER: bool>( self, el: &Element, position: Position, ) -> Self::State
where Self: Sized,

Hydrates using RenderHtml::hydrate, beginning at the given element and position.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> SerializableKey for T

Source§

fn ser_key(&self) -> String

Serializes the key to a unique string. Read more
Source§

impl<Ret> SpawnIfAsync<(), Ret> for Ret

Source§

fn spawn(self) -> Ret

Spawn the value into the dioxus runtime if it is an async block
Source§

impl<T> StorageAccess<T> for T

Source§

fn as_borrowed(&self) -> &T

Borrows the value.
Source§

fn into_taken(self) -> T

Takes the value.
Source§

impl<T, O> SuperFrom<T> for O
where O: From<T>,

Source§

fn super_from(input: T) -> O

Convert from a type to another type.
Source§

impl<T, O, M> SuperInto<O, M> for T
where O: SuperFrom<T, M>,

Source§

fn super_into(self) -> O

Convert from a type to another type.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<F, V> ToTemplate for F
where F: ReactiveFunction<Output = V>, V: ToTemplate,

Source§

const TEMPLATE: &'static str = V::TEMPLATE

The HTML content of the static template.
Source§

fn to_template( buf: &mut String, class: &mut String, style: &mut String, inner_html: &mut String, position: &mut Position, )

Renders a view type to a template. This does not take actual view data, but can be used for constructing part of an HTML <template> that corresponds to a view of a particular type.
Source§

const CLASS: &'static str = ""

The class attribute content known at compile time.
Source§

const STYLE: &'static str = ""

The style attribute content known at compile time.
Source§

const LEN: usize = _

The length of the template.
Source§

fn to_template_attribute( buf: &mut String, class: &mut String, style: &mut String, inner_html: &mut String, position: &mut Position, )

Renders a view type to a template in attribute position.
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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> With for T
where T: Read,

Source§

type Value = <<T as Read>::Value as Deref>::Target

The type of the value contained in the signal.
Source§

fn try_with<U>(&self, fun: impl FnOnce(&<T as With>::Value) -> U) -> Option<U>

Subscribes to the signal, applies the closure to the value, and returns the result, or None if the signal has already been disposed.
Source§

fn with<U>(&self, fun: impl FnOnce(&Self::Value) -> U) -> U

Subscribes to the signal, applies the closure to the value, and returns the result. Read more
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> WithUntracked for T

Source§

type Value = <<T as ReadUntracked>::Value as Deref>::Target

The type of the value contained in the signal.
Source§

fn try_with_untracked<U>( &self, fun: impl FnOnce(&<T as WithUntracked>::Value) -> U, ) -> Option<U>

Applies the closure to the value, and returns the result, or None if the signal has already been disposed.
Source§

fn with_untracked<U>(&self, fun: impl FnOnce(&Self::Value) -> U) -> U

Applies the closure to the value, and returns the result. Read more