[−][src]Struct new_home_application::communication::SingleActionMessage
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]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Serialize for SingleActionMessage
[src]
Auto Trait Implementations
impl RefUnwindSafe for SingleActionMessage
impl Send for SingleActionMessage
impl Sync for SingleActionMessage
impl Unpin for SingleActionMessage
impl UnwindSafe for SingleActionMessage
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,