pub struct Namespace(/* private fields */);Expand description
A @Namespace, shared between the views that should match.
namespace_id mints a fresh id on every call, because SwiftUI’s
counter advances on each read. That is right for a modifier that scopes one
subtree and wrong for one whose whole purpose is pairing: two views handed
separately-minted ids are in different namespaces and can never match, so
matchedGeometryEffect built the correct Swift value and did nothing. The
_in variants below take one of these instead, which is how SwiftUI spells
it — @Namespace var ns once, in: ns at each use.
Implementations§
Trait Implementations§
impl Copy for Namespace
impl Eq for Namespace
impl StructuralPartialEq for Namespace
Auto Trait Implementations§
impl Freeze for Namespace
impl RefUnwindSafe for Namespace
impl Send for Namespace
impl Sync for Namespace
impl Unpin for Namespace
impl UnsafeUnpin for Namespace
impl UnwindSafe for Namespace
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more