pub enum ResourceEntry {
Summary(Box<StaticResourceSummary>),
Full(Box<StaticResource>),
}Expand description
Entry in the resource registry - either full resource or summary only
This allows the registry to store minimal summaries (memory efficient) or full resources with tiles (for traversal), similar to staticStore’s cacheMetadataOnly pattern.
Variants§
Summary(Box<StaticResourceSummary>)
Summary only - minimal memory, no tiles
Full(Box<StaticResource>)
Full resource with tiles
Implementations§
Source§impl ResourceEntry
impl ResourceEntry
Sourcepub fn resourceinstanceid(&self) -> &str
pub fn resourceinstanceid(&self) -> &str
Get the resource instance ID
Sourcepub fn descriptors(&self) -> Option<&StaticResourceDescriptors>
pub fn descriptors(&self) -> Option<&StaticResourceDescriptors>
Get the resource descriptors (if available)
Sourcepub fn has_tiles(&self) -> bool
pub fn has_tiles(&self) -> bool
Check if this entry has tiles (is a full resource with tiles loaded)
Sourcepub fn as_full(&self) -> Option<&StaticResource>
pub fn as_full(&self) -> Option<&StaticResource>
Get as full resource reference (if available)
Sourcepub fn as_full_mut(&mut self) -> Option<&mut StaticResource>
pub fn as_full_mut(&mut self) -> Option<&mut StaticResource>
Get as full resource mutable reference (if available)
Sourcepub fn to_summary(&self) -> StaticResourceSummary
pub fn to_summary(&self) -> StaticResourceSummary
Convert to summary (extracts summary from full resource if needed)
Sourcepub fn to_cache_entry(&self) -> RelatedResourceEntry
pub fn to_cache_entry(&self) -> RelatedResourceEntry
Convert to minimal cache entry
Trait Implementations§
Source§impl Clone for ResourceEntry
impl Clone for ResourceEntry
Source§fn clone(&self) -> ResourceEntry
fn clone(&self) -> ResourceEntry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ResourceEntry
impl Debug for ResourceEntry
Source§impl From<&ResourceEntry> for RelatedResourceEntry
impl From<&ResourceEntry> for RelatedResourceEntry
Source§fn from(entry: &ResourceEntry) -> Self
fn from(entry: &ResourceEntry) -> Self
Converts to this type from the input type.
Source§impl From<StaticResource> for ResourceEntry
impl From<StaticResource> for ResourceEntry
Source§fn from(resource: StaticResource) -> Self
fn from(resource: StaticResource) -> Self
Converts to this type from the input type.
Source§impl From<StaticResourceSummary> for ResourceEntry
impl From<StaticResourceSummary> for ResourceEntry
Source§fn from(summary: StaticResourceSummary) -> Self
fn from(summary: StaticResourceSummary) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ResourceEntry
impl RefUnwindSafe for ResourceEntry
impl Send for ResourceEntry
impl Sync for ResourceEntry
impl Unpin for ResourceEntry
impl UnsafeUnpin for ResourceEntry
impl UnwindSafe for ResourceEntry
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