[][src]Struct new_home_application::communication::SingleActionMessage

pub struct SingleActionMessage {
    pub error: Option<String>,
    pub info: Option<String>,
    pub debug: Option<String>,
    pub success: Option<String>,
    pub markdown: Option<String>,
    pub list: Option<String>,
    pub table: Option<String>,
    pub scripts: Option<Vec<String>>,
    pub component: Option<String>,
    pub modal: Option<String>,
}

The (shorter) ActionMessage

The action message is meant to be a format which can be visualized to the user. It has to contain information for the user.

Example

A ActionMessage is supposed to follow the pattern, that an object, keyed by the message type, contains a message as a string. This can be represented in JSON like the following

{
  "error": "An error occurred"
}

This will show an error message. However a ActionMessage can also contain multiple message types in one object which then looks like the following

{
  "error": "An error occurred",
  "info": "Try to do it different"
}

Fields

error: Option<String>

Defines a error message field

info: Option<String>

Defines a info message field

debug: Option<String>

Defines a debug message field

success: Option<String>

Defines a success message field

markdown: Option<String>

Defines a markdown message field

list: Option<String>

Defines a list in the message

table: Option<String>

Defines a table in the message

scripts: Option<Vec<String>>

Causes the UI to load the following additional JavaScript files. The files might only be loaded if they were not before!

component: Option<String>

Causes the UI to load the following component to the current view This has to be an HTML tag name. The tag is supposed to be a custom element which renders the wanted view. For more information on how to best implement a component element take a look into the UI Project.

modal: Option<String>

Causes the UI to open the following modal This has to be an HTML tag name. The tag is supposed to be a custom element which renders the wanted view. For more information on how to best implement a modal element take a look into the UI Project.

Trait Implementations

impl Debug for SingleActionMessage[src]

impl<'de> Deserialize<'de> for SingleActionMessage[src]

impl Serialize for SingleActionMessage[src]

Auto Trait Implementations

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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

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

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

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>,