pub struct BoundedScope<'a, 'b>where
    'b: 'a,
{ /* private fields */ }
Expand description

A reference to a reactive scope. This reference is Copy, allowing it to be copied into closures without any clones.

The intended way to access a Scope is with the create_scope function.

Lifetime

  • 'a - The lifetime of the scope and all data allocated on it. This allows passing in data from an outer scope into an inner scope. This lifetime is invariant because it is used within an cell.
  • 'b - The bounded lifetime of the scope. This ensures that the scope cannot live longer than this lifetime. This lifetime is covariant because if the scope can outlive 'b1, it can also outlive 'b2 if 'b1: 'b2.

As a convenience, the Scope type alias is provided that uses the same lifetime for both 'a and 'b. Any BoundedScope can be casted to a Scope because the second lifetime parameter is always longer than the first.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. 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

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 resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
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.