pub fn constant<T>(value: T) -> Constant<T>Expand description
Creates a new constant reactive value.
This is a convenience function for creating a Constant<T> instance.
§Parameters
value: The value to be wrapped in aConstant.
§Returns
A new Constant instance containing the provided value.
§Examples
use nami::{Signal, constant};
let c = constant("Hello, world!");
assert_eq!(c.get(), "Hello, world!");