pub trait DisplayFieldLookup {
// Required method
fn get_display_value(
&self,
path: &str,
) -> Result<String, DisplayRenderError>;
}Expand description
Field lookup for rendering on-chain Display templates.
Resolves a dot-separated path (e.g. owner.address from {owner.address})
to the string that replaces the placeholder.
Required Methods§
Sourcefn get_display_value(&self, path: &str) -> Result<String, DisplayRenderError>
fn get_display_value(&self, path: &str) -> Result<String, DisplayRenderError>
Looks up a field by its path and returns its string representation.
§Errors
Returns a DisplayRenderError if the path is empty, cannot be found,
exceeds nesting limits, or references an unsupported type (such as a vector).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl DisplayFieldLookup for MoveStruct
Field lookup over the raw Move representation of an object, used by
GraphQL.
impl DisplayFieldLookup for MoveStruct
Field lookup over the raw Move representation of an object, used by GraphQL.
Unlike the JSON-RPC representation, the raw struct keeps framework types
such as String and UID as nested structs, so a path may walk into
them (e.g. id.id). Only the final value is converted for display, and it
must still be a scalar.
fn get_display_value(&self, path: &str) -> Result<String, DisplayRenderError>
Implementors§
impl DisplayFieldLookup for IotaMoveStruct
Field lookup over the JSON-RPC representation of an object, used by the full node and the indexer.
Unlike the raw Move representation, framework types such as String and
UID are already flattened to plain values, so a path like id.id fails
here. A path may walk through nested structs and enum variants. Only the
final value is converted for display, and it must be a scalar.