Struct harmony_rust_sdk::api::harmonytypes::v1::Action[][src]

pub struct Action {
    pub text: String,
    pub url: String,
    pub id: String,
    pub type: i32,
    pub presentation: i32,
    pub children: Vec<Action>,
}

Rules on actions: Actions without a type are assumed to be Button actions or Menu actions when nested. Button actions can only have Menu actions as children. Dropdown actions can only have non-recursive Menu actions as children. Menu actions can only have other Menu actions as children. SmallEntry and LargeActions cannot have children.

Fields

text: Stringurl: Stringid: Stringtype: i32presentation: i32children: Vec<Action>

Implementations

impl Action[src]

pub fn type(&self) -> ActionType[src]

Returns the enum value of type, or the default if the field is set to an invalid enum value.

pub fn set_type(&mut self, value: ActionType)[src]

Sets type to the provided enum value.

pub fn presentation(&self) -> ActionPresentation[src]

Returns the enum value of presentation, or the default if the field is set to an invalid enum value.

pub fn set_presentation(&mut self, value: ActionPresentation)[src]

Sets presentation to the provided enum value.

Trait Implementations

impl Clone for Action[src]

impl Debug for Action[src]

impl Default for Action[src]

impl Message for Action[src]

impl PartialEq<Action> for Action[src]

impl StructuralPartialEq for Action[src]

Auto Trait Implementations

impl RefUnwindSafe for Action

impl Send for Action

impl Sync for Action

impl Unpin for Action

impl UnwindSafe for Action

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> IntoRequest<T> for T[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,