Module freya::prelude

source ·
Expand description

Useful imports.

Re-exports§

  • pub use dioxus_core;
  • pub use dioxus_hot_reload;
  • pub use crate::launch::*;
  • pub use crate::plugins::*;

Modules§

Macros§

  • Alias for Cow::Borrowed, because that’s used a million times so shortening it is nice. Makes the code more readable.
  • This macro is used to generate a impl Default block for any type with the function new_maybe_sync that takes a generic T
  • Example usage:
  • This macro is used to generate impl PartialEq blocks for any Readable type that takes a generic T
  • This macro is used to generate impl Display, and impl Debug blocks for any Readable type that takes a generic T
  • Start the hot reloading server with the current directory as the root
  • This macro is used to generate impl Display, impl Debug, impl PartialEq, and impl Eq blocks for any Readable type that takes a generic T
  • The rsx! macro makes it easy for developers to write jsx-style markup in their components.
  • The rsx! macro makes it easy for developers to write jsx-style markup in their components.
  • Create FooThemeWith structs without having to deal with the verbose syntax.
  • A helper macro for cloning multiple values at once
  • This macro has three arguments separator by commas.
  • A helper macro for use_reactive that merges uses the closure syntax to elaborate the dependency array
  • This macro is used to generate impl Add, impl AddAssign, impl Sub, impl SubAssign, impl Mul, impl MulAssign, impl Div, and impl DivAssign blocks for any Writable type that takes a generic T

Structs§

Enums§

Constants§

Traits§

  • A trait for any storage backing type.
  • Any component that implements the ComponentFn trait can be used as a component.
  • A trait for giving a type a useful default value.
  • A dependency is a trait that can be used to determine if a effect or selector should be re-run.
  • A dependency is a trait that can be used to determine if a effect or selector should be re-run.
  • A trait for anything that has a dynamic list of attributes
  • A value that can be converted into an attribute value
  • A trait that allows various items to be converted into a dynamic node for the rsx macro
  • Abstract the path matching.
  • Every “Props” used for a component must implement the Properties trait. This trait gives some hints to Dioxus on how to memoize the props and some additional optimizations that can be made. We strongly encourage using the derive macro to implement the Properties trait automatically as guarantee that your memoization strategy is safe.
  • A trait for states that can be read from like crate::Signal, crate::GlobalSignal, or crate::ReadOnlySignal. You may choose to accept this trait as a parameter instead of the concrete type to allow for more flexibility in your API. For example, instead of creating two functions, one that accepts a crate::Signal and one that accepts a crate::GlobalSignal, you can create one function that accepts a Readable type.
  • An extension trait for Readable<Option> that provides some convenience methods.
  • An extension trait for Readable<Vec> that provides some convenience methods.
  • A trait for a storage backing type. (RefCell, RwLock, etc.)
  • A enhanced version of the From trait that allows with more flexibility.
  • A enhanced version of the Into trait that allows with more flexibility.
  • Common trait for editable texts
  • A trait to allow results to be thrown upwards to the nearest Error Boundary
  • A trait for states that can be read from like crate::Signal, or crate::GlobalSignal. You may choose to accept this trait as a parameter instead of the concrete type to allow for more flexibility in your API. For example, instead of creating two functions, one that accepts a crate::Signal and one that accepts a crate::GlobalSignal, you can create one function that accepts a Writable type.
  • An extension trait for Writable<Option> that provides some convenience methods.
  • An extension trait for Writable<Vec> that provides some convenience methods.

Functions§

Type Aliases§

Attribute Macros§

  • Streamlines component creation. This is the recommended way of creating components, though you might want lower-level control with more advanced uses.
  • Derive props for a component within the component definition.

Derive Macros§

  • Derive macro generating an impl of the trait Default.