GtBridge.GtViewedObject (gt_bridge v0.17.3)

Copy Markdown View Source

Helper module for getting view declarations for Elixir objects.

This provides a way to get GT-compatible view specifications for any Elixir object, similar to Python's GtViewedObject.

Summary

Functions

Get view declarations for any object. This can be called from GT via eval.

Get view declarations for an object by its registry ID. This is called from GT via eval when inspecting a proxy object.

Functions

get_default_view(self, builder)

get_views_declarations(object, views_server \\ GtBridge.Views)

@spec get_views_declarations(any(), GenServer.server()) :: [map()]

Get view declarations for any object. This can be called from GT via eval.

get_views_declarations_by_id(object_id)

@spec get_views_declarations_by_id(non_neg_integer()) :: [map()]

Get view declarations for an object by its registry ID. This is called from GT via eval when inspecting a proxy object.