Struct Loader Copy item path Source pub struct Loader<T: 'static> { }Expand description A Loader is a signal that represents a value that is loaded asynchronously.
Once a Loader<T> has been successfully created from use_loader, it can be use like a normal signal of type T.
When the loader is re-reloading its values, it will no longer suspend its component, making it
very useful for server-side-rendering.
Get the error that occurred during loading, if any.
After initial load, this will return None until the next reload fails.
Restart the loading task.
After initial load, this won’t suspend the component, but will reload in the background.
Check if the loader has failed.
Cancel the current loading task.
Performs copy-assignment from
source.
Read more Formats the value using the given formatter.
Read more The resulting type after dereferencing.
Dereferences the value.
Formats the value using the given formatter.
Read more Convert into an attribute value
Consume this item and produce a DynamicNode
Tests for self and other values to be equal, and is used by ==.
Tests for !=. The default implementation is almost always sufficient,
and should not be overridden without very good reason.
Tests for self and other values to be equal, and is used by ==.
Tests for !=. The default implementation is almost always sufficient,
and should not be overridden without very good reason.
Get the current value of the signal. Unlike read, this will not subscribe the current scope to the signal which can cause parts of your UI to not update.
If the signal has been dropped, this will panic.
The target type of the reference.
The type of the storage this readable uses.
Try to get a reference to the value without checking the lifetime. This will subscribe the current scope to the signal.
Read more Get the underlying subscriber list for this readable. This is used to track when the value changes and notify subscribers.
Additional data associated with the write reference.
Try to get a mutable reference to the value without checking the lifetime. This will update any subscribers.
Read more Immutably borrows from an owned value.
Read more Mutably borrows from an owned value.
Read more 🔬 This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from
self to
dest.
Read more Returns the argument unchanged.
Converts to this type from a reference to the input type.
Create an instance of this type from an initialization function
Instruments this type with the provided
Span, returning an
Instrumented wrapper.
Read more Calls U::from(self).
That is, this conversion is whatever the implementation of
From <T> for U chooses to do.
Box the readable value into a trait object. This is useful for passing around readable values without knowing their concrete type.
Get the current value of the state. If this is a signal, this will subscribe the current scope to the signal.
If the value has been dropped, this will panic. Calling this on a Signal is the same as
using the signal() syntax to read and subscribe to its value
Try to get the current value of the state. If this is a signal, this will subscribe the current scope to the signal.
Get a reference to the value without checking the lifetime. This will subscribe the current scope to the signal.
Read more Get the current value of the state without subscribing to updates. If the value has been dropped, this will panic.
Read more Try to peek the current value of the signal without subscribing to updates. If the value has
been dropped, this will return an error.
Get the current value of the signal without checking the lifetime.
Unlike read, this will not subscribe the current scope to the signal which can cause parts of your UI to not update. Read more Map the references of the readable value to a new type. This lets you provide a view
into the readable value without creating a new signal or cloning the value.
Read more Clone the inner value and return it. If the value has been dropped, this will panic.
Run a function with a reference to the value. If the value has been dropped, this will panic.
Run a function with a reference to the value. If the value has been dropped, this will panic.
Index into the inner value and return a reference to the result. If the value has been dropped or the index is invalid, this will panic.
Check if the hashmap is empty.
Get the length of the hashmap.
Get the capacity of the hashmap.
Get the value for the given key.
Check if the hashmap contains the given key.
Check if the hashset is empty.
Get the length of the hashset.
Get the capacity of the hashset.
Check if the hashset contains the given value.
Unwraps the inner value and clones it.
Attempts to read the inner value of the Option.
Unwraps the inner value and clones it.
Attempts to read the inner value of the Option.
Check the capacity of the string.
Returns the length of the inner vector.
Returns true if the inner vector is empty.
Get the first element of the inner vector.
Get the last element of the inner vector.
Get the element at the given index of the inner vector.
Get an iterator over the values of the inner vector.
🔬 This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Spawn the value into the dioxus runtime if it is an async block
Convert from a type to another type.
Convert from a type to another type.
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning.
Read more Uses borrowed data to replace owned data, usually by cloning.
Read more Converts the given value to a
String.
Read more The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Box the writable value into a trait object. This is useful for passing around writable values without knowing their concrete type.
Get a mutable reference to the value. If the value has been dropped, this will panic.
Try to get a mutable reference to the value.
Get a mutable reference to the value without checking the lifetime. This will update any subscribers.
Read more Map the references and mutable references of the writable value to a new type. This lets you provide a view
into the writable value without creating a new signal or cloning the value.
Read more Run a function with a mutable reference to the value. If the value has been dropped, this will panic.
Set the value of the signal. This will trigger an update on all subscribers.
Invert the boolean value of the signal. This will trigger an update on all subscribers.
Index into the inner value and return a reference to the result.
Takes the value out of the Signal, leaving a Default in its place.
Replace the value in the Signal, returning the old value.
Clears the map, removing all key-value pairs.
Retains only the key-value pairs that match the given predicate.
Inserts a key-value pair into the map. If the key was already present, the old value is returned.
Extends the map with the key-value pairs from the given iterator.
Removes a key from the map, returning the value at the key if the key was previously in the map.
Get a mutable reference to the value at the given key.
Clear the hash set.
Retain only the elements specified by the predicate.
Inserts a value into the set. Returns true if the value was not already present.
Extends the set with the values from the given iterator.
Removes a value from the set. Returns true if the value was present.
Gets the value out of the Option, or inserts the given value if the Option is empty.
Gets the value out of the Option, or inserts the value returned by the given function if the Option is empty.
Attempts to write the inner value of the Option.
Pushes a character to the end of the string.
Pushes a character to the end of the string.
Pops a character from the end of the string.
Inserts a string at the given index.
Inserts a character at the given index.
Remove a character at the given index
Replace a range of the string with the given string.
Clears the string, removing all characters.
Extends the string with the given iterator of characters.
Truncates the string to the given length.
Splits the string off at the given index, returning the tail as a new string.
Pushes a new value to the end of the vector.
Pops the last value from the vector.
Inserts a new value at the given index.
Removes the value at the given index.
Clears the vector, removing all values.
Extends the vector with the given iterator.
Truncates the vector to the given length.
Swaps two values in the vector.
Retains only the values that match the given predicate.
Splits the vector into two at the given index.
Try to mutably get an element from the vector.
Gets an iterator over the values of the vector.