pub struct UnmountContext {
pub component_id: ComponentId,
pub parent_id: Option<ComponentId>,
pub timestamp: Instant,
pub reason: UnmountReason,
pub force_cleanup: bool,
}
Expand description
Context provided during component unmounting
Fields§
§component_id: ComponentId
Component ID being unmounted
parent_id: Option<ComponentId>
Parent component ID (if any)
timestamp: Instant
Unmount timestamp
reason: UnmountReason
Unmount reason
force_cleanup: bool
Whether cleanup should be forced
Implementations§
Source§impl UnmountContext
impl UnmountContext
Sourcepub fn new(component_id: ComponentId, reason: UnmountReason) -> Self
pub fn new(component_id: ComponentId, reason: UnmountReason) -> Self
Create a new unmount context
Sourcepub fn with_parent(
component_id: ComponentId,
parent_id: ComponentId,
reason: UnmountReason,
) -> Self
pub fn with_parent( component_id: ComponentId, parent_id: ComponentId, reason: UnmountReason, ) -> Self
Create an unmount context with parent
Sourcepub fn with_force_cleanup(self, force: bool) -> Self
pub fn with_force_cleanup(self, force: bool) -> Self
Set force cleanup flag
Trait Implementations§
Source§impl Clone for UnmountContext
impl Clone for UnmountContext
Source§fn clone(&self) -> UnmountContext
fn clone(&self) -> UnmountContext
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for UnmountContext
impl RefUnwindSafe for UnmountContext
impl Send for UnmountContext
impl Sync for UnmountContext
impl Unpin for UnmountContext
impl UnwindSafe for UnmountContext
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Event for T
impl<T> Event for T
Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert to Any for downcasting (mutable)
Source§fn event_type(&self) -> &'static str
fn event_type(&self) -> &'static str
Get the event type name
Source§impl<T> Props for T
impl<T> Props for T
Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert to mutable Any for downcasting