pub struct ActionPresentationSpec {
pub placement: ActionPlacement,
pub interaction: ActionInteraction,
pub confirmation: Option<ActionConfirmation>,
pub availability: Option<AvailabilityHint>,
pub view_id: Option<String>,
pub record_parameter: Option<String>,
}Expand description
View 构建期声明的 Action 展示语义。
Custom 必须同时声明稳定 view_id;其它交互禁止
携带 view_id,避免把它误用为物理文件路径。
Fields§
§placement: ActionPlacementAction 展示位置。
interaction: ActionInteractionAction 交互方式。
confirmation: Option<ActionConfirmation>可选二次确认。
availability: Option<AvailabilityHint>可选的非安全性可用提示。
view_id: Option<String>前端白名单注册表中的稳定标识。
record_parameter: Option<String>行上下文记录标识应写入的 Action 参数。
Implementations§
Source§impl ActionPresentationSpec
impl ActionPresentationSpec
Sourcepub fn new(placement: ActionPlacement, interaction: ActionInteraction) -> Self
pub fn new(placement: ActionPlacement, interaction: ActionInteraction) -> Self
创建显式展示声明。
Sourcepub fn confirmation(self, confirmation: ActionConfirmation) -> Self
pub fn confirmation(self, confirmation: ActionConfirmation) -> Self
设置二次确认文案。
Sourcepub fn availability(self, availability: AvailabilityHint) -> Self
pub fn availability(self, availability: AvailabilityHint) -> Self
设置展示可用性提示。
Sourcepub fn record_parameter(self, parameter: impl Into<String>) -> Self
pub fn record_parameter(self, parameter: impl Into<String>) -> Self
设置行上下文记录标识对应的 Action 参数。
Trait Implementations§
Source§impl Clone for ActionPresentationSpec
impl Clone for ActionPresentationSpec
Source§impl Debug for ActionPresentationSpec
impl Debug for ActionPresentationSpec
impl Eq for ActionPresentationSpec
Source§impl PartialEq for ActionPresentationSpec
impl PartialEq for ActionPresentationSpec
impl StructuralPartialEq for ActionPresentationSpec
Auto Trait Implementations§
impl Forget for ActionPresentationSpec
impl Freeze for ActionPresentationSpec
impl Move for ActionPresentationSpec
impl RefUnwindSafe for ActionPresentationSpec
impl Send for ActionPresentationSpec
impl Sync for ActionPresentationSpec
impl Unpin for ActionPresentationSpec
impl UnsafeUnpin for ActionPresentationSpec
impl UnwindSafe for ActionPresentationSpec
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