pub struct InstanceMessage {
pub argv: Vec<String>,
pub cwd: String,
pub action: Option<String>,
pub args: Map<String, Value>,
}Expand description
The payload one launch hands to the primary.
Fields§
§argv: Vec<String>The launch’s argv (including the program path).
cwd: StringThe launch’s working directory.
action: Option<String>What the primary should do, e.g. "show-section".
args: Map<String, Value>Named arguments for the action, e.g. {"section": "x"}.
Implementations§
Source§impl InstanceMessage
impl InstanceMessage
Sourcepub fn from_process() -> Self
pub fn from_process() -> Self
This process’s argv and working directory, with no action.
Sourcepub fn with_action(self, action: &str) -> Self
pub fn with_action(self, action: &str) -> Self
Set the action.
Trait Implementations§
Source§impl Clone for InstanceMessage
impl Clone for InstanceMessage
Source§impl Debug for InstanceMessage
impl Debug for InstanceMessage
Source§impl Default for InstanceMessage
impl Default for InstanceMessage
Source§impl<'de> Deserialize<'de> for InstanceMessage
impl<'de> Deserialize<'de> for InstanceMessage
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 InstanceMessage
impl PartialEq for InstanceMessage
Source§impl Serialize for InstanceMessage
impl Serialize for InstanceMessage
impl StructuralPartialEq for InstanceMessage
Auto Trait Implementations§
impl Freeze for InstanceMessage
impl RefUnwindSafe for InstanceMessage
impl Send for InstanceMessage
impl Sync for InstanceMessage
impl Unpin for InstanceMessage
impl UnsafeUnpin for InstanceMessage
impl UnwindSafe for InstanceMessage
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