pub enum Request {
Cheat(i32, i32),
Stats(bool),
AppId,
Screenshot,
Launch((String, String)),
Exit,
Buttons(u8),
Data(Box<[u8]>),
}
Expand description
Messages that clients send into the runtime.
Variants§
Cheat(i32, i32)
Call the cheat
callback with the given two arguments.
It’s up to the app how to handle the passed values, but the most common practice is to treat the first value as the command to execute (for exmaple, 42 for “noclip”) and the second value as the command argument (for example, 0 for “disable” and 1 for “enable”).
Stats(bool)
Turn on/off collection and sending of runtime stats.
AppId
Get the full ID of the currently running app.
Screenshot
Take a screenshot.
Launch((String, String))
Launch an app.
Exit
Launch the launcher.
Buttons(u8)
Send buttons input.
Data(Box<[u8]>)
Send data into the running app.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Request
impl<'de> Deserialize<'de> for Request
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 Encode<'_> for Request
impl Encode<'_> for Request
impl StructuralPartialEq for Request
Auto Trait Implementations§
impl Freeze for Request
impl RefUnwindSafe for Request
impl Send for Request
impl Sync for Request
impl Unpin for Request
impl UnwindSafe for Request
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