pub struct RelatedResourceEntry {
pub datatype: String,
pub id: String,
pub resource_type: String,
pub graph_id: String,
pub title: Option<String>,
pub descriptors: Option<StaticResourceDescriptors>,
pub meta: Option<HashMap<String, Value>>,
}Expand description
Cache entry for a related resource, matching ResourceInstanceCacheEntry from TypeScript.
This structure is compatible with TypeScript’s getValueCache format, allowing direct lookup by tileId/nodeId when rendering ViewModels.
Fields§
§datatype: StringDatatype marker (always “resource-instance”)
id: StringResource instance ID (UUID)
resource_type: StringModel class name (derived from graph name, e.g., “Person”)
graph_id: StringGraph ID
title: Option<String>Display title (resource name)
descriptors: Option<StaticResourceDescriptors>Resource descriptors (name, description, map_popup, slug)
meta: Option<HashMap<String, Value>>Additional metadata
Implementations§
Source§impl RelatedResourceEntry
impl RelatedResourceEntry
Sourcepub fn from_resource_entry(
entry: &ResourceEntry,
model_class_name: Option<&str>,
) -> Self
pub fn from_resource_entry( entry: &ResourceEntry, model_class_name: Option<&str>, ) -> Self
Create from a resource entry with optional model class name
Sourcepub fn from_summary(
summary: &StaticResourceSummary,
model_class_name: Option<&str>,
) -> Self
pub fn from_summary( summary: &StaticResourceSummary, model_class_name: Option<&str>, ) -> Self
Create from a resource summary with optional model class name
Sourcepub fn resourceinstanceid(&self) -> &str
pub fn resourceinstanceid(&self) -> &str
Get the resource instance ID
Trait Implementations§
Source§impl Clone for RelatedResourceEntry
impl Clone for RelatedResourceEntry
Source§fn clone(&self) -> RelatedResourceEntry
fn clone(&self) -> RelatedResourceEntry
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 RelatedResourceEntry
impl Debug for RelatedResourceEntry
Source§impl<'de> Deserialize<'de> for RelatedResourceEntry
impl<'de> Deserialize<'de> for RelatedResourceEntry
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
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 RelatedResourceEntry
impl From<&StaticResource> for RelatedResourceEntry
Source§fn from(resource: &StaticResource) -> Self
fn from(resource: &StaticResource) -> Self
Converts to this type from the input type.
Source§impl From<&StaticResourceSummary> for RelatedResourceEntry
impl From<&StaticResourceSummary> for RelatedResourceEntry
Source§fn from(summary: &StaticResourceSummary) -> Self
fn from(summary: &StaticResourceSummary) -> Self
Converts to this type from the input type.
Source§impl From<RelatedResourceEntry> for StaticResourceSummary
impl From<RelatedResourceEntry> for StaticResourceSummary
Source§fn from(entry: RelatedResourceEntry) -> Self
fn from(entry: RelatedResourceEntry) -> Self
Hydrate a cache entry back to a full summary (with optional fields as None/empty)
Auto Trait Implementations§
impl Freeze for RelatedResourceEntry
impl RefUnwindSafe for RelatedResourceEntry
impl Send for RelatedResourceEntry
impl Sync for RelatedResourceEntry
impl Unpin for RelatedResourceEntry
impl UnsafeUnpin for RelatedResourceEntry
impl UnwindSafe for RelatedResourceEntry
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