leptos::reactive::prelude

Trait ReadUntrackedOptional

Source
pub trait ReadUntrackedOptional: Sized + DefinedAt {
    type Value;

    // Required method
    fn try_read_untracked(&self) -> Option<Self::Value>;

    // Provided method
    fn read_untracked(&self) -> Self::Value { ... }
}
Expand description

An alternative ReadUntracked trait that works with Option<Readable> types.

Required Associated Types§

Source

type Value

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

Required Methods§

Source

fn try_read_untracked(&self) -> Option<Self::Value>

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

Provided Methods§

Source

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

Returns the guard.

§Panics

Panics if you try to access a signal that has been disposed.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<T> ReadUntrackedOptional for Option<T>

Implementors§