Type Alias GlobalSignal

Source
pub type GlobalSignal<T> = Global<Signal<T>, T>;
Expand description

A signal that can be accessed from anywhere in the application and created in a static

Aliased Type§

struct GlobalSignal<T> { /* private fields */ }

Implementations§

Source§

impl<T: 'static> GlobalSignal<T>

Source

pub fn id(&self) -> GenerationalBoxId

Get the generational id of the signal.

Source

pub fn signal(&self) -> Signal<T>

Resolve the global signal. This will try to get the existing value from the current virtual dom, and if it doesn’t exist, it will create a new one.

Trait Implementations§

Source§

impl<T: Debug + 'static> Debug for GlobalSignal<T>

Source§

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

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

impl<T: Display + 'static> Display for GlobalSignal<T>

Source§

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

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

impl<T: PartialEq + 'static> PartialEq<T> for GlobalSignal<T>

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · 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.