pub struct ServicePlan {
pub service_name: String,
pub handler_name: String,
pub base_path: String,
pub package: String,
pub methods: Vec<MethodPlan>,
pub managed_resources: Vec<ManagedResource>,
pub documentation: Option<String>,
pub hierarchy: Vec<ResourceHierarchy>,
pub resource_accessor_params: Option<Vec<String>>,
pub direct_children: Vec<ChildLink>,
}Expand description
Plan for generating code for a single service
Fields§
§service_name: StringService name (e.g., “CatalogsService”)
handler_name: StringHandler trait name (e.g., “CatalogHandler”)
base_path: StringBase URL path for this service (e.g., “catalogs”)
package: StringProto package name (e.g., “unitycatalog.catalogs.v1”)
methods: Vec<MethodPlan>Methods to generate for this service
managed_resources: Vec<ManagedResource>Resources managed by this service
documentation: Option<String>Documentation from protobuf service comments
hierarchy: Vec<ResourceHierarchy>Ancestor chain for this service’s managed resource, derived cross-service from
resource_reference { child_type } annotations.
Entries are ordered root-first (shallowest ancestor first). For example, for
a Table service this would be [catalog_name (depth 0), schema_name (depth 1)].
Empty when no resource_reference annotations are present — codegen falls back to
naming heuristics in that case.
resource_accessor_params: Option<Vec<String>>Parameter names for this service’s resource accessor on the aggregate client, e.g.
["catalog_name", "schema_name"] for a nested Schema or ["name"] for a flat Catalog.
The trailing element is the resource’s own <singular>_name; any preceding elements are
ancestor identifiers. A list of length > 1 means the resource is nested and its full name
is the dot-joined components.
None for resource-less services (no accessor is generated). Computed once during analysis
(Phase 2, after hierarchy is populated) so the four accessor emitters — Rust aggregate,
Python, Node, TypeScript — all read the same list instead of each re-deriving it.
direct_children: Vec<ChildLink>Direct child resources of this service’s managed resource, used to generate child-navigation
accessors (e.g. catalog.schema(name)) and child-create methods (e.g. catalog.create_schema)
on the scoped client.
A resource C is a direct child of P when C’s Self::resource_accessor_params equals P’s
plus exactly one additional trailing component (P’s params are a prefix of C’s, and
C.len() == P.len() + 1). Sorted by child_singular. Empty for leaf or flat resources.
Computed in Phase 2 of analyze_metadata after every service’s accessor params are known.
Trait Implementations§
Source§impl Clone for ServicePlan
impl Clone for ServicePlan
Source§fn clone(&self) -> ServicePlan
fn clone(&self) -> ServicePlan
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for ServicePlan
impl RefUnwindSafe for ServicePlan
impl Send for ServicePlan
impl Sync for ServicePlan
impl Unpin for ServicePlan
impl UnsafeUnpin for ServicePlan
impl UnwindSafe for ServicePlan
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more