pub struct Re<T: Convenient>(_);
Expand description

A helper struct, assisting to keep reactive code reentrant.

Dropping this value (e.g. with let _ = ...) most likely is a reentrancy violation. Functions returning Re could not be called in a row in general case without special precautions resulting in the adding a queue.

If you need to “split” control flow and perform several actions, use intermediate dependecy property/event. Each dependency property/event has an inner queue and support multiply listeners.

Implementations

Wraps value into the Re helper struct, allowing to return it from reactive callback.

Such callback are required, for example, by BindingExt constructor’s dispatch argument (see BindingExt1::new, BindingExt2::new, …).

An instance with no value.

It indends to prevent remaining processing of current reactive action. For example, it can be used in BindingExt constructor’s dispatch argument (see BindingExt1::new, BindingExt2::new, …) to prevent going value into the binding target.

Also it can be used as Re<!> instance in places where no further reactive processing supposed, such as in a BindingBase::dispatch / Binding::dispatch callback.

Explicitely drops Re with no value, allowing to call functions returning Re in any context.

This could breaks code piece reenterability, so it is supposed to use in places, where it is garanteed to be not a problem, e.g. in main function (or any other place which executes once).

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.