Struct sycamore_reactive::ReactiveScope[][src]

pub struct ReactiveScope(_);
Expand description

Owns the effects created in the current reactive scope. The effects are dropped and the cleanup callbacks are called when the ReactiveScope is dropped.

A new ReactiveScope is usually created with create_root. A new ReactiveScope is also created when a new effect is created with create_effect and other reactive utilities that call it under the hood.

Implementations

Create a new empty ReactiveScope.

This should be rarely used and only serve as a placeholder. The scope created by this method is detached from the scope hierarchy, meaning that functionality such as contexts would not work through this scope.

In general, prefer create_scope instead.

Runs the passed callback in the reactive scope pointed to by this handle.

Runs the passed future in the reactive scope pointed to by this handle.

Returns the source code Location where this ReactiveScope was created.

Trait Implementations

Returns the “default value” for a type. Read more

Executes the destructor for this type. Read more

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

Performs the conversion.

Performs the conversion.

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.