pub struct RegistryEntry<T> {
pub handle: ObjectHandle,
pub object: T,
}Expand description
Entry in the object registry containing the object and its handle
This struct wraps an object with its associated handle, providing a unified way to store and retrieve objects from the registry.
§Type Parameters
T- The type of object being stored (e.g., Window, Tab, Pane)
Fields§
§handle: ObjectHandleThe handle for this object
object: TThe actual object data
Implementations§
Source§impl<T> RegistryEntry<T>
impl<T> RegistryEntry<T>
Sourcepub fn new(handle: ObjectHandle, object: T) -> Self
pub fn new(handle: ObjectHandle, object: T) -> Self
Create a new registry entry
§Arguments
handle- The handle for this objectobject- The actual object data
Sourcepub fn handle(&self) -> ObjectHandle
pub fn handle(&self) -> ObjectHandle
Get the object’s handle
Sourcepub fn object_mut(&mut self) -> &mut T
pub fn object_mut(&mut self) -> &mut T
Get a mutable reference to the object
Sourcepub fn into_object(self) -> T
pub fn into_object(self) -> T
Consume the entry and return the object
Trait Implementations§
Source§impl<T: Clone> Clone for RegistryEntry<T>
impl<T: Clone> Clone for RegistryEntry<T>
Source§fn clone(&self) -> RegistryEntry<T>
fn clone(&self) -> RegistryEntry<T>
Returns a duplicate 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<T> Freeze for RegistryEntry<T>where
T: Freeze,
impl<T> RefUnwindSafe for RegistryEntry<T>where
T: RefUnwindSafe,
impl<T> Send for RegistryEntry<T>where
T: Send,
impl<T> Sync for RegistryEntry<T>where
T: Sync,
impl<T> Unpin for RegistryEntry<T>where
T: Unpin,
impl<T> UnsafeUnpin for RegistryEntry<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for RegistryEntry<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Gets the layout of the type.