Skip to main content

ServicePlan

Struct ServicePlan 

Source
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: String

Service name (e.g., “CatalogsService”)

§handler_name: String

Handler trait name (e.g., “CatalogHandler”)

§base_path: String

Base URL path for this service (e.g., “catalogs”)

§package: String

Proto 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

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ServicePlan

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more