pub struct ModulePresentationSpec {
pub identity: AccountIdentitySpec,
pub title: String,
pub description: String,
pub icon: String,
pub order: i32,
pub primary_action: Option<ActionRef>,
pub action_presentations: BTreeMap<ActionRef, ActionPresentationSpec>,
}Expand description
Module 的构建期展示声明。
页面主 Action 与附加 Action 均使用强类型 ActionRef;前端只消费投影后的
operation id,不再从 Action 名称后缀猜测页面语义。
Fields§
§identity: AccountIdentitySpecModule 所属账户身份。
title: String用户可见标题。
description: StringModule 业务说明。
icon: String前端语义图标 token。
order: i32同一身份下的稳定顺序。
primary_action: Option<ActionRef>可选页面主 Action。
action_presentations: BTreeMap<ActionRef, ActionPresentationSpec>不属于 TableView 的页面级 Action 展示语义。
Implementations§
Source§impl ModulePresentationSpec
impl ModulePresentationSpec
Sourcepub fn new(
identity: AccountIdentitySpec,
title: impl Into<String>,
icon: impl Into<String>,
) -> Self
pub fn new( identity: AccountIdentitySpec, title: impl Into<String>, icon: impl Into<String>, ) -> Self
创建 Module 展示声明。
Sourcepub fn description(self, description: impl Into<String>) -> Self
pub fn description(self, description: impl Into<String>) -> Self
设置 Module 业务说明。
Sourcepub fn primary_action(self, action: ActionRef) -> Self
pub fn primary_action(self, action: ActionRef) -> Self
设置页面主 Action。
Sourcepub fn present_action(
self,
action: ActionRef,
presentation: ActionPresentationSpec,
) -> Self
pub fn present_action( self, action: ActionRef, presentation: ActionPresentationSpec, ) -> Self
声明一个页面级 Action 的展示语义。
Trait Implementations§
Source§impl Clone for ModulePresentationSpec
impl Clone for ModulePresentationSpec
Source§fn clone(&self) -> ModulePresentationSpec
fn clone(&self) -> ModulePresentationSpec
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ModulePresentationSpec
impl Debug for ModulePresentationSpec
impl Eq for ModulePresentationSpec
Source§impl PartialEq for ModulePresentationSpec
impl PartialEq for ModulePresentationSpec
impl StructuralPartialEq for ModulePresentationSpec
Auto Trait Implementations§
impl Freeze for ModulePresentationSpec
impl RefUnwindSafe for ModulePresentationSpec
impl Send for ModulePresentationSpec
impl Sync for ModulePresentationSpec
impl Unpin for ModulePresentationSpec
impl UnsafeUnpin for ModulePresentationSpec
impl UnwindSafe for ModulePresentationSpec
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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