pub struct BuiltApp { /* private fields */ }Expand description
构建完成且运行期不可变的 App 定义。
Implementations§
Source§impl BuiltApp
impl BuiltApp
Sourcepub fn catalog(&self) -> &DefinitionCatalog
pub fn catalog(&self) -> &DefinitionCatalog
返回只读定义 Catalog。
Sourcepub fn table_definitions(&self) -> &[TableDefinition]
pub fn table_definitions(&self) -> &[TableDefinition]
返回从 Catalog 唯一字段事实预编译的数据库 schema 定义。
Sourcepub fn compiled_views(&self) -> &[CompiledTableView]
pub fn compiled_views(&self) -> &[CompiledTableView]
返回启动期解析完成的默认/显式 Table Views。
Sourcepub fn ui_catalog(
&self,
context: &ActionContext,
) -> Result<UiCatalog, BaseError>
pub fn ui_catalog( &self, context: &ActionContext, ) -> Result<UiCatalog, BaseError>
按当前请求的认证身份投影有权访问的版本化 UI 目录。
Action 和 View 均复用 dispatch 的构建期冻结授权策略;TableView 列同时按 字段读取角色过滤,secret 字段始终 fail-closed。租户数据范围仍由实际 TableQuery 独立强制执行,前端目录不能替代服务端数据隔离。
Sourcepub fn context(&self, request: Request) -> ActionContext
pub fn context(&self, request: Request) -> ActionContext
为一次请求创建绑定当前应用资源的 ActionContext。
Sourcepub async fn dispatch(
&self,
handle: ActionHandle,
request: Request,
) -> Result<ApiResponse, BaseError>
pub async fn dispatch( &self, handle: ActionHandle, request: Request, ) -> Result<ApiResponse, BaseError>
通过启动期解析的 handle 执行请求。
Sourcepub async fn dispatch_context(
&self,
handle: ActionHandle,
context: ActionContext,
) -> Result<ApiResponse, BaseError>
pub async fn dispatch_context( &self, handle: ActionHandle, context: ActionContext, ) -> Result<ApiResponse, BaseError>
执行已由传输层补全元数据的上下文。
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for BuiltApp
impl !UnwindSafe for BuiltApp
impl Freeze for BuiltApp
impl Send for BuiltApp
impl Sync for BuiltApp
impl Unpin for BuiltApp
impl UnsafeUnpin for BuiltApp
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
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> ⓘ
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 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> ⓘ
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