Struct sycamore::reactive::BoundedScope
source · [−]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
sourceimpl<'a, 'b> Clone for BoundedScope<'a, 'b>where
'b: 'a,
impl<'a, 'b> Clone for BoundedScope<'a, 'b>where
'b: 'a,
sourcefn clone(&self) -> BoundedScope<'a, 'b>
fn clone(&self) -> BoundedScope<'a, 'b>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl<'a, 'b> Debug for BoundedScope<'a, 'b>where
'b: 'a,
impl<'a, 'b> Debug for BoundedScope<'a, 'b>where
'b: 'a,
impl<'a, 'b> Copy for BoundedScope<'a, 'b>where
'b: 'a,
Auto Trait Implementations
impl<'a, 'b> !RefUnwindSafe for BoundedScope<'a, 'b>
impl<'a, 'b> !Send for BoundedScope<'a, 'b>
impl<'a, 'b> !Sync for BoundedScope<'a, 'b>
impl<'a, 'b> Unpin for BoundedScope<'a, 'b>
impl<'a, 'b> !UnwindSafe for BoundedScope<'a, 'b>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more