pub struct Contribution {
pub on: String,
pub label: String,
pub hint: String,
pub append: String,
pub item: Value,
}Expand description
A button a plugin adds where the interface shows something it can act on
(Manifest::contribute). Pressed, it adds item to the plugin’s
settings array append, with {placeholders} in its strings filled in
from what it was pressed on, and opens the plugin’s page (or card) there.
On signal (each of a system’s signals, in Setup): {system}
(its short name), {signal} (system:ID), {id} and {name} (its
name, else its id). A string that is just one placeholder inside an array
(["{signal}"]) becomes that value.
Fields§
§on: StringWhere the button goes: signal.
label: StringWhat it says (“Notify”).
hint: StringA tooltip.
append: StringThe settings array (a top-level key of the plugin’s settings) it adds to.
item: ValueThe item it adds.
Trait Implementations§
Source§impl Clone for Contribution
impl Clone for Contribution
Source§impl Debug for Contribution
impl Debug for Contribution
Source§impl Default for Contribution
impl Default for Contribution
Source§impl<'de> Deserialize<'de> for Contributionwhere
Contribution: Default,
impl<'de> Deserialize<'de> for Contributionwhere
Contribution: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for Contribution
impl PartialEq for Contribution
Source§impl Serialize for Contribution
impl Serialize for Contribution
impl StructuralPartialEq for Contribution
Auto Trait Implementations§
impl Freeze for Contribution
impl RefUnwindSafe for Contribution
impl Send for Contribution
impl Sync for Contribution
impl Unpin for Contribution
impl UnsafeUnpin for Contribution
impl UnwindSafe for Contribution
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