Skip to main content

ReadUntrackedOptional

Trait ReadUntrackedOptional 

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§

type Value

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

Required Methods§

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

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

Provided Methods§

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".

Implementations on Foreign Types§

§

impl<T> ReadUntrackedOptional for Option<T>

Implementors§